Monday, August 26, 2013

Changing Host Header in SharePoint 2010

We had a requirement of changing the host header in SharePoint Server 2010, 
For most of the time I just follow changing the IIS edit binding option and I change the new host header. Like the steps mentioned below,
  1. Go to IIS (Start > Run > InetMgr), Select your target web application, Click on "Bindings" on right pane
  2. Click on "Edit" and then update the "Host Name" with new URL for the web application.


After goggling for best way of changing the host header, I found a nice and neat article from "Russ Maxwell"  - How to properly change the Host Header URL of a web application in SharePoint 2010.


First, let’s describe what it means to create a host header web application.   When you create a web application you have the ability to add a host header url.

initialcreate

In the above screenshot, I created a web application with a host header URL of RussMaxOriginalHost.   After creating the web application and site collection, I browse to the IIS Site and look at the bindings and the Host Header is added automatically which is expected.

image

Also, If I check Alternate Access Mappings in Central Admin I see the default zone is populated with my host header URL for the given web application

image

And finally, browsing to the site after creating the site collection renders the site with the specified host header.

image

What happens when I need to change this host header URL value?   My original thought was to simply go edit the bindings of IIS and change the alternate access mapping.   This actually works but isn’t recommended because eventually the bindings in IIS will be overwritten by the original host header URL.  

For Example:
Going to Central Administrator, Services on Server, and stopping and starting the Microsoft SharePoint Foundation Web Application service for the specified server will overwrite any manually updated host header entry in IIS/Site bindings with the original host header URL. 
or
Adding a new SharePoint Server to an existing farm will get the site with the original host header URL after Microsoft SharePoint Foundation Web Application service is started which happens automatically via PSConfig.

Explanation
When you create a web application and specify a host header URL, you stamp the host header URL on the spwebapplication object which is stored in the objects table in the configuration database.   When you try to change the host header URL by updating the Alternate Access Mapping and manually update the bindings in IIS, the SPWebApplication object is never updated so it continues to maintain knowledge of the original host header URL and not the new one.   When you start the Microsoft SharePoint Foundation Web Application service in Central Admin, the information from the associated SPWebApplication object in the configuration database is used when instantiating IIS Sites.  This is why the original host header URL shows up.


Options
The best automated way to update the Host Header URL on a web application is similar to the approach in SharePoint 2007 which is to un-extend and re-extend the Web Application.   That is, disassociate any connection with the existing IIS site and re-establishing that association.   Steps are the following assuming I’m changing my host header URL from russmaxoriginalhost to russmaxnewhost.     
1.  Go to Central Administrator, Application Management, Select the Web Application you wish to change and hit the arrow under Delete and choose  Remove SharePoint from IIS Site.

clip_image002           
2. Next, select the associated site you which to update the host header URL against.    For Delete IIS web sites, select No and hit OK.
image    
Note:  If you have more than two IIS sites available, that means your web application is extended so choose the appropriate Zone/IIS Site that you would like to update.           
3. Go to Central Administrator, Application Management, Select the same Web Application and choose Extend button on the ribbon.
4. Choose Use an exisitng IIS Site and choose the original site from Step 2 above.   Specify the New Host Header URL and any other settings that should match.  In my case, I updated the Host Header to RussMaxNewHost and hit OK here.
image

After updating DNS, the site comes up with no problems.
image


Question:   What if the web application is already extended to another zone let’s say extranet zone and you want to change host header URL for the default zone?
Answer:  This will still work fine since your only making changes to the IIS site associated with the default zone, the site hosting the extranet zone will remain untouched and should continue to work fine after the above changes.

Question:   How can I validate the associated SPWebApplication object in the configuration database contains the new host header URL?
Answer:   You can run the following Power Shell to validate.   Here is a sample:
$wa = get-spwebapplication “http://randomURL”
$iissettings = $wa.GetIisSettingsWithFallback("Default")
$iissettings.serverbindings
This will output the host header URL for the default zone for the web application of your desired URL.



Wednesday, August 21, 2013

SharePoint SQL Server Support Matrix

Thanks to  JASON WARREN

SharePoint SQL Server Support Matrix


2013
2010
2007
2003
2001
SQL Server 2012
All editions
64-bit
All editions
Requires SharePoint SP1
64-bit



SQL Server 2008 R2
SQL Server SP1
All editions
64-bit
All editions
64-bit
All editions
Requires SharePoint SP2
32-bit, 64-bit


SQL Server 2008

SQL Server SP1 + CU2 or CU5
CU3 or CU4 not recommended
All editions
64-bit
All editions
Requires SharePoint SP1
32-bit, 64-bit


SQL Server 2005

SQL Server SP3
All editions
64-bit
SQL Server SP1
All editions
32-bit, 64-bit
SQL Server SP4
Standard 32-bit, 64-bit
Enterprise 32-bit, 64-bit
Workgroup 32-bit, 64-bit

SQL Server 2000


SQL Server SP4
All editions
32-bit, 64-bit
Standard 32-bit, 64-bit
Enterprise 32-bit, 64-bit
Workgroup 32-bit, 64-bit
MSDE 32-bit, 64-bit
All editions
SQL Server 7.0




All editions

Notes
  1. An empty cell mean this SQL Server/SharePoint combination is not supported.
  2. This table reflects all SharePoint editions, i.e. WSS/Foundation and Server Standard/Enterprise/Internet Sites. In other words within a SharePoint version, the SQL Server requirements are the same.
  3. I’ve indicated if a minimum SQL Server or SharePoint Service Pack is required otherwise assume RTM and later.
  4. The documentation isn’t always complete. When specific editions are not provided, I’ve assumed all mainstream editions (e.g. Standard, Enterprise, Datacenter, Web, Workgroup, Express) are supported and used the phrase All editions.
  5. Why have I listed unsupported versions of SharePoint? One day you’ll encounter one of these ancient farms in need of some help and the answer will be obvious.