SharePoint Web Application Extension

The urls below are ficticious so if you attempt to navigate to them.  I have no idea what will happen nor do I claim responsibility or support for any content on the http://www.devsite.org if it even exits.  I have used this name in an attempt to provide a complete example of what occoured and how to correct the problem.
 
A team member recently deployed a web application capability to our development environment (web application name: devsite80) which caused an error in the web.config.  When I went to central admin to deactivate the feature I tested using our internal url (http://devsite) which is the default zone’s url for devsite80 in SharePoint alternate access mappings.  The site was back up, then I attempted to reconnect to our dev site from my local machine, again using the public address.  The site was down, with the same web.config issue.  What happened?
 
Background
When we created the public development site, we extended the internal development site (http://devsite) site.  This allowed the public development site to be configured in the same mannor as the internal development site, but also added the proper host headers, etc for us.
 
When features were deployed and activated everything worked fine.  When feature were deactivated, only the http://devsite site was effected.  (Quick Note:  In Central Admin only http://devsite was avaible for deploy/activate/deactivation, http://www.devsite.org was not.)  After inspecting the file system we noted that there were two independent folders, devsite80 and http://www.devsite.org80.  The other thing I found was that devsite80’s web.config had the feature’s xml changes removed, but http://www.devsite.org80’s web.config did not.  We, a system admin and myself, decided that managing one folder would be much easier than trying to manage two (kinda obvious).  So here is what we did.
 
Steps
  1. Central Admin->Application Management->Remove SharePoint from IIS Web Site
    1. Selected http://devsite as the Web Application
    2. Selected http://www.devsite.org from the Select IIS Web site and zone to remove
    3. Selected the Yes radio button for Delete IIS Web sites
    4. OK
  2. Central Admin->Operations->Alternate access mappings
    1. Select Add Internal Urls
      1. Selected Devsite80 from the Alternate Access Mapping Collection
      2. Entered http://www.devsite.org for the URL protocol, host and port
      3. Selected Internet from the Zone dropdown
      4. Save
  3. Opened IIS management console (Right Click My Computer->Manage)
    1. Navigated to the Web Sites folder (IIS Manager->local computer->Web Sites)
    2. Right clicked on Harmonieweb80 site and selected Properties
      1. Selected Advanced… on the Web Site tab (next to the IP Address drop down list)
      2. Selected Add… in the Multiple identities for this Web site.
        1. Selected (All Unassigned) from the dropdown list for the IP Address (This site did not have any specific IP address assigned so this was appropriate, you might have to select an appropriate IP address)
        2. Entered 80 for the TCP port
        3. Entered http://www.devsite.org for the Host Header value
        4. OK
      3. OK
    3. Apply
    4. OK
  4. Restart IIS

Following this we ended up with one web application, one web application folder, and the ability to activate and deactivate successfully.  We were also able to now access the site from both the http://devsite and the http://www.devsite.org urls.

Recommendation

If you ever need to add additional urls for a site use alternate access mapping with host headers.  This may take you a few extra steps, but for management it will save you a lot of time.  DO NOT use web application extension to create a new zone entry for an already existing application unless you want them to function and act independently.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s