Rijwan Ansari Blogspot, .NET, CSS, C#.NET, VB.NET, ASP.NET, .NET Reporting, Crystal Reporting,

Rijwan Ansari Blogspot, .NET, CSS, C#.NET, VB.NET, ASP.NET, .NET Reporting, Crystal Reporting,
Visual Studio, .NET, SQL Server, SQL Query, ASP.NET, C#, VB, C++, CSS, JQUERY, AJAX, Javascript, .NET Reporting etc

Wednesday, August 19, 2015

Customize SharePoint URL using AAM and DNS

1. Configure DNS
  • Open DNS Manager
  • Navigate to respective forward lookup zone.
  • Create a CNAME record by right clicking  in the zone and selecting “New Alias (CNAME)
Select relative host record of the CNAME.

        CNAME_Browse

Once you add the CNAME you can see an entry as below.


Update Group Policy
Make sure you run a Group Policy update after adding the record.
       
Check connectivity from CNAME record
And then you can check whether the CNAME is being resolved.  You can monitor that CNAME is being resolved.
       
2. Configure IIS

If the web application is hosted in port 80 you don’t have to edit the IIS host header as you will be redirected to port 80 when enter the CNAME.
If you are using a different port other that 80 you might have to IIS website.
  • To add an entry right click the web site in IIS manager, then select edit bindings.
    IIS_EditBindings
  • Add Host name and Port. Note that you should CNAME record and the Host Name should be identical.
    IIS_AddBinding
3. Add Alternate Access Mapping in SharePoint Central Administration
Central Administration -> Application Management -> Configure Alternate Access Mapping -> Edit Public URLs
Select the web Application, then add the URL to Preferred zone.
    
Now you can access SharePoint site by entering the Customized URL (CNAME).

Wednesday, June 24, 2015

SharePoint Powershell command to verify if the Outgoing Email Functions in Sharepoint Environment (Send Test Email Form SharePoint)

SharePoint Powershell command to verify if the Outgoing Email Functions in Sharepoint Environment

(Send Test Email Form SharePoint)


One can simply test outgoing email from SharePoint.

With PowerShell you can send a test email from within SharePoint.
Run the following code with SharePoint Management Shell (run as administrator)
Command:

$email = "Receiver@email.com"
$subject = "Subject Of Email"
$body = "Body Of Email, Test Text for Body"

$site = New-Object Microsoft.SharePoint.SPSite "http://sharepoint"
$web = $site.OpenWeb()
[Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($web,0,0,$email,$subject,$body)

// A True or False will confirm the message has been sent or not


-----------------------------------------------------------
If its true then the email will be delivered.
If its false then the email functionality does not work in the SharePoint box.


Saturday, April 11, 2015

SharePoint 2013 - Introduction, Features, and Roles

Introduction

Welcome to the world of SharePoint 2013. SharePoint 2013 Production version is released & Live implementations are going on. In this article I would like to re-iterate the features of SharePoint as a whole &  advantages of going with it.

What is SharePoint?

In short, SharePoint is a browser-based collaboration, content management, and extensible platform from Microsoft. The latest release of the product is SharePoint 2013.



What are the features of SharePoint?

Depending on the business perspective the features of SharePoint are many:
                


SharePoint Roles

In this article I would like to discuss the various SharePoint Roles. SharePoint Roles and Assignment to people is an essential step towards SharePoint project analysis and implementation.
Following are the most important Roles, I could identify here:

  • SharePoint Architect
  • SharePoint Developer
  • SharePoint Designer
  • SharePoint Administrator
  • SharePoint Trainer
  • SharePoint Power User
  • SharePoint User
The role involvement is depicted below:

Now let us explore what each Role performs.

 

SharePoint Architect

Following are the responsibilities of Architect:

  • Should be an expert in SharePoint, .NET, and SQL Server
  • Analyze requirements and gain business objectives
  • Collaborate with Customer
  • Define and implement Governance Plan
  • Architectural decisions on number of servers, capacity planning, taxonomy, etc.
  • Direct developers in building custom solutions
  • Direct administrator on SharePoint infrastructure usage
  • Configure search center, business intelligence
  • Decide on Hold, Retention policies
  • Ensure performance and monitoring mechanisms of the implementation

 

SharePoint Developer

Following are the responsibilities of Developer:
  • Develop custom solutions for SharePoint involving Web Parts, Workflows, Object Model
  • Submit Deployment Package to administrator
  • Should have a good knowledge with SharePoint Out of Box features and programming in .NET
  • Responsible for running unit tests, memory tests involved in development

 

SharePoint Designer

Following are the responsibilities of Designer:

  • Expert in HTML, CSS, XML, Master Pages with good understanding of SharePoint features
  • Provides customization of SharePoint Site Pages
  • Implementation of branding
  • Responsible for the non-programming customizations of SharePoint

 

SharePoint Administrator

Following are the responsibilities of Administrator:

  • Expert in SharePoint Out of the Box features, Active Directory, with good amount of networking skills
  • Setup Windows Server, SharePoint Servers, Services, Active Directory, IIS etc.
  • Monitor the health of Servers, implement retention policies
  • Performs Site Collection setup, DNS mapping, users, and Permissions setup
  • Assigns new users to groups and sets access to sites based on requirement
  • Coordinates with network administrator
  • Deploy new solutions, components to SharePoint server
  • Executes PowerShell scripts
  • Performs backup of content database

 

SharePoint Trainer

Following are the responsibilities of Trainer:

  • Expert in SharePoint from user point of view
  • Well knowledge with SharePoint compatible browser, Office applications
  • Train customers to a good amount of confidence with implementation
  • Train customers in creating Sites, Libraries, Lists and using Office Integration, Search

 

SharePoint Power User

Following are the responsibilities of Power User:

  • Power User is a User with a good amount of knowledge in SharePoint features
  • Should be guiding other users during times of difficulties

 

SharePoint User

Following are the responsibilities of User:

  • Should be expert in business functionality and knowledgeable with SharePoint implementation.
  • Performs his/her activities through SharePoint.

Tuesday, March 17, 2015

Insert, Update, delete and display using single Stored Procedure



Create table first. Here I have created StoreInfo table with above column.

What is stored Procedure?

A stored procedure is a group of sql statements that has been created and stored in the database. Stored procedure will accept input parameters so that a single procedure can be used over the network by several clients using different input data. Stored procedure will reduce network traffic and increase the performance. If we modify stored procedure all the clients will get the updated stored procedure.

Advantages of using stored procedures

a) Stored procedure allows modular programming.
You can create the procedure once, store it in the database, and call it any number of times in your program. 

b) Stored Procedure allows faster execution.
If the operation requires a large amount of SQL code is performed repetitively, stored procedures can be faster. They are parsed and optimized when they are first executed, and a compiled version of the stored procedure remains in memory cache for later use. This means the stored procedure does not need to be reparsed and reoptimized with each use resulting in much faster execution times. 

c) Stored Procedure can reduce network traffic. An operation requiring hundreds of lines of Transact-SQL code can be performed through a single statement that executes the code in a procedure, rather than by sending hundreds of lines of code over the network.

d) Stored procedures provide better security to your data
Users can be granted permission to execute a stored procedure even if they do not have permission to execute the procedure's statements directly.

In SQL we are having different types of stored procedures are there
a) System Stored Procedures b) User Defined Stored procedures c) Extended Stored Procedures

System Stored Procedures:
System stored procedures are stored in the master database and these are starts with a sp_ prefix. These procedures can be used to perform variety of tasks to support sql server functions for external application calls in the system tables 
Ex: sp_helptext [StoredProcedure_Name]

User Defined Stored Procedures:
User Defined stored procedures are usually stored in a user database and are typically designed to complete the tasks in the user database. While coding these procedures don’t use sp_ prefix because if we use the sp_ prefix first it will check master database then it comes to user defined database

Extended Stored Procedures:
Extended stored procedures are the procedures that call functions from DLL files. Now a day’s extended stored procedures are depreciated for that reason it would be better to avoid using of Extended Stored procedures. 

 Insert, Update, delete and display using single Stored Procedure


CREATE PROCEDURE [dbo].[StoreInfo_Pro]
(
    @StoreID Bigint,
    @StoreName varchar(50),
    @Address varchar(100) ,
    @StateCd varchar(50),
    @ZipCd varchar(5),
    @Phone  varchar(50),
    @Action varchar(50)
)
AS
BEGIN
   
    SET NOCOUNT ON;
    if(@Action = 'Display')
    BEGIN
        SELECT * FROM StoreInfo;
    END
    else if(@Action = 'Add')
    BEGIN
        INSERT INTO StoreInfo(StoreID,StoreName,Address,StateCd,ZipCd,Phone) VALUES (@StoreID,@StoreName,@Address,@StateCd,@ZipCd,@Phone)
    END
    else if(@Action = 'Update')
    BEGIN
        UPDATE StoreInfo Set StoreName=@StoreName,Address=@Address,StateCd=@StateCd,ZipCd=@ZipCd,@Phone=@Phone WHERE StoreID=@StoreID
    END
    else if(@Action = 'Delete')
    BEGIN
        DELETE FROM StoreInfo WHERE StoreID=@StoreID
    END
END

 

This is the stored procedure we can use for insert, update, delete, select by passing one extra parameter Action.
1. If Action value is Add, insert query will be executed.
2. If Action value is Display, select query will be executed.
3. If Action value is Update, Update query will be executed.
4. If Action Value is Delete, delete query will be executed.


Sunday, June 29, 2014

Introduction SQL

Introduction to SQL

SQL is a standard language for accessing and manipulating databases.

What is SQL?

  • SQL stands for Structured Query Language
  • SQL lets you access and manipulate databases
  • SQL is an ANSI (American National Standards Institute) standard.

    What Can SQL do?

  • SQL can execute queries against a database
  • SQL can retrieve data from a database
  • SQL can insert records in a database
  • SQL can update records in a database
  • SQL can delete records from a database
  • SQL can create new databases
  • SQL can create new tables in a database
  • SQL can create stored procedures in a database
  • SQL can create views in a database
  • SQL can set permissions on tables, procedures, and views

    SQL is a Standard - BUT....

    Although SQL is an ANSI (American National Standards Institute) standard, there are different versions of the SQL language.
    However, to be compliant with the ANSI standard, they all support at least the major commands (such as SELECT, UPDATE, DELETE, INSERT, WHERE) in a similar manner.

    Using SQL in Your Web Site

    To build a web site that shows data from a database, you will need:
  • An RDBMS database program (i.e. MS Access, SQL Server, MySQL)
  • To use a server-side scripting language, like PHP or ASP
  • To use SQL to get the data you want
  • To use HTML / CSS

    RDBMS

    RDBMS stands for Relational Database Management System.
    RDBMS is the basis for SQL, and for all modern database systems such as MS SQL Server, IBM DB2, Oracle, MySQL, and Microsoft Access.
    The data in RDBMS is stored in database objects called tables.
    A table is a collection of related data entries and it consists of columns and rows.