A Practical Guide to SharePoint 2013

A Practical Guide to SharePoint 2013
A Practical Guide to SharePoint 2013 - Book by Saifullah Shafiq

Monday, March 20, 2017

SharePoint Integration with IIS



Before discussing the Integration, we will discuss the architecture of SharePoint at the architecture level. The diagram represents the architecture of SharePoint and split into two halves. The Left-half is administrator world and the right-half is the end-user world. Everything in right half resides in SharePoint content database. Let's continue with some terminologies before goes into deep dive. 

Farm

A farm is a logical architecture or logical grouping of SharePoint servers that share common resources of SharePoint. It can be a single machine or more than one machine. The farm is differentiated on their tier levels. Might be possible Farm can be 1to N-tier. Installation can either be done at 1 machine to N. Most of the cases in production you have to choose at least 5-tier architecture for application Server, front-end Server, SQL, AD+DNS, Office Web App Server and Exchange; you can add more than one application server, Front-End etc at any level.

Configuration Database

Each farm is associated with a SQL server database called a configuration database. The SharePoint CONFIG database as SharePoint_Config created during SharePoint Products Configuration Wizard and is used by the central administration to manage all of your web applications, site collections, and service applications etc. Configuration Database co-located with the Central Administration database. Generally, you only have one instance of SQL server per farm, unless you cluster or mirror the instance. A SharePoint farm can only have one central administration database although you can host the central administration website on more than one server on your farm.


Site collection and Site

A site collection is a logical grouping of sites and a site is a container for information. In a site, we can have lists and libraries. A site collection is made up of one top-level site and all sites below it. The number of site collections you can have in a single web application depends on the capacity of your server infrastructure. 
For more information here is the link of Technet.


List and Library

A list is like an Excel worksheet just like rows and columns of data. A document library is just a special case of a list. We still have rows and columns of data, but each row is associated with a document. So we can store pictures, text files, web pages and all kind of documents. In-library others column except document filed called metadata of that library. A list has major versions only, can have attachments but not indexed, do not have Check-in/Check-out features and didn't open with explorer but in cased of library, files are directly in the library can't have attachments, have both minor (draft) and major (published) versioning, have Check-in/Check-Out, publishing libraries can use Page Layouts and Have Unique Document Ids out of the box.


SharePoint content database

Everything on the end user part (right-hand side) in the architectural diagram is stored in SharePoint content database. So, if we create a site within a site collection, we are adding an entry to a table in the database. If we create a list, again, we are adding entries into tables. If we add a document to a document library, that will also add an entry in the database.


Deployment mechanism of web application

A web application is just an extended IIS website, so when we create a web application, SharePoint creates an IIS website but modifies the WEB.CONFIG file, GLOBAL.ASPX file and creates some virtual directories which point to the SharePoint system folders.


Integration with IIS

SharePoint integrates with both IIS and ASP.NET, IIS websites are extended through the standard extension mechanisms built into ASP.NET. In SharePoint, integration with IIS is done at web application level. The files used by IIS are stored in \INETPUB\WWWROOT\WSS\VIRTUALDIRECTORIES\<PORT> and this port is used by the IIS website and the SharePoint web application.
The WSS part of the path refers to the “Window SharePoint services”. The folder of the web application at port 80 just has a GLOBAL.ASAX and WEB.CONFIG file. The default installation or the basic installation of SharePoint takes over port 80.


ASP.net and SharePoint Development

The default installation or the basic installation of SharePoint takes over port 80. So if you want to do SharePoint development as well as ASP.NET development then you will need to have a separate IIS website where you can host your ASP.NET applications. They will host their externally to SharePoint inside IIS.

SharePoint Central Administration Utility


When you create new web applications or when you are managing web applications you've to use the SharePoint Central Administration Utility (browser based) or STS Admin (classic way) or PowerShell commands instead of IIS Manager. Now there are certain cases where you do need to get into the IIS Manager like IISRESET etc.

The default installation path for SharePoint files used by IIS is C:\inetpub\wwwroot\wss\VirtualDirectories\80.




"12625" is the name of the port assigned to central admin web application. We can change the port of the newly created web application but it will not change the folder name. So, the name of the folder will remain unchanged. If we want to change the name of the folder too, then we will need to update is manual.

We can see in the screenshot that upon changing ports to the "9999", it changed the ports on IIS panel and in SharePoint but it did not change the folder name. SharePoint files are present in the SP system folders and SP databases.


The below screenshot is showing the website of central admin.

We can see the comparison of both folders. The 80-port directory contains files, GLOBAL.ASPX and WEB.CONFIG and we can also store the backups files of web config.

Screenshot presents the mapping between the web application and IIS manager. 

Now create a new web application using SP central administration, click “New”, remove GUID from DB Name, specify the port number and click OK. After that a create the site collection. The web application is now added to SharePoint central administration. In Application Pools inside the IIS Manager new application pool would be created and virtual directories in contents tab.

Authors [Ali Mamoon, Mujahid Hafeez]

No comments:

Post a Comment