none
New site collection not using the IIS site created for it

    Question

  • I am running into a curious issue while trying to create a new site collection (MOSS 2007).  I have created a new web application, extended it,  created a new IIS site, then created a new site collection under this web application.  The site is functioning normally but I noticed that it is not actually running under the IIS site I specified.  I can go into IIS and stop my new IIS site and my site collection still loads just fine.  It appears to be running under the IIS site that is hosting our main site.

    Normally this wouldn't be an issue but we use a custom layouts directory for the main site and I need to revert back to the OOTB layouts directory for this new site collection.  The normal method for this (method 2) isn't working since the IIS site I'm changing the directory for isn't being used by my new site collection.

    I'm baffled by this so any help would be appreciated!


    • Edited by Mikey52 Wednesday, February 22, 2012 8:20 PM
    Wednesday, February 22, 2012 8:20 PM

All replies

  • Creating a Web application and extending it will actually create two IIS sites.  If you create a third IIS site why would you think that sharepoint will use it?  The only time you create an IIS site would be if you do it first and pick that site as the one you want to use when you create your web application.  But you said you did it after creating the web application.  There is no need to go into IIS when creating a sharepoint web applicaton or site collection. 


    Paul Stork SharePoint Server
    MVP Chief SharePoint Architect: Sharesquared
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Wednesday, February 22, 2012 11:32 PM
  • You say that you created a new Web application, and then extended it, but your site collection is running under your main site. This leads me to believe that when you created your new site collection, you did not choose your new web application and instead created it in your original web application.

    To add to what Paul has also stated - bear in mind that extending a web application does not create a new web app or any new databses. Any site collections can still be accessed via the "original" web application by using that web applications URL. An extended web app simply provides you a different URL path and options for different authentication and customizations.


    Imagine what we could be...if we could just imagine. | Daniel A. Galant | Sr. SharePoint Solutions Architect EPC Group.net

    Thursday, February 23, 2012 12:48 AM
  • Creating a Web application and extending it will actually create two IIS sites.  If you create a third IIS site why would you think that sharepoint will use it?  The only time you create an IIS site would be if you do it first and pick that site as the one you want to use when you create your web application.  But you said you did it after creating the web application.  There is no need to go into IIS when creating a sharepoint web applicaton or site collection. 


    Paul Stork SharePoint Server
    MVP Chief SharePoint Architect: Sharesquared
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Sorry, I should have clarified my steps.  I originally created the new web app and told it to create a new IIS site at the same time.  My understanding is that any site collections created under this web app should then be hosted by that IIS site, is that not correct?  When I realized my site collection wasn't using my new IIS site I deleted both the site collection and that IIS site.  I then extended my web app and told it to create a new IIS site and recreated my site collection.

    Hope that's more clear!

    Thursday, February 23, 2012 2:09 PM
  • Not sure why it wouldn't be using the IIS site created when the web app was created.  But you should never delete an IIS site used by SharePoint directly in IIS.  SharePoint will still think its there.  And extending the web app will create a new IIS site that points to the old database, but SharePoint is then expecting to find two sites, not one.  To remove an IIS site you need to delete the entire web application, not just the IIS site.  Deleting individual IIS sites will lead to a corrupted environment that will do very strange things like the ones you describe.  I know you said this happened before you deleted the IIS site, but the only way to clean it up now will be to delete the entire web application and start over.

    Paul Stork SharePoint Server
    MVP Chief SharePoint Architect: Sharesquared
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Thursday, February 23, 2012 3:15 PM
  • Not sure why it wouldn't be using the IIS site created when the web app was created.  But you should never delete an IIS site used by SharePoint directly in IIS.  SharePoint will still think its there.  And extending the web app will create a new IIS site that points to the old database, but SharePoint is then expecting to find two sites, not one.  To remove an IIS site you need to delete the entire web application, not just the IIS site.  Deleting individual IIS sites will lead to a corrupted environment that will do very strange things like the ones you describe.  I know you said this happened before you deleted the IIS site, but the only way to clean it up now will be to delete the entire web application and start over.

    Paul Stork SharePoint Server
    MVP Chief SharePoint Architect: Sharesquared
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Just removed the whole web app and started over.  The only thing I didn't do was an iisreset (production box) before creating the site collection but I did the same steps in my dev environment and it's working normally.  Guess I'll wait until I can do an iisreset before I create the new site collection and try again.
    Thursday, February 23, 2012 3:30 PM
  • Figured I would follow up my own question since I just had that "Aha" moment.  The new site collection needs to be accessible via https but our main site collection is already running https.  That's why it keeps hosting my new site collection under my main IIS web site.

    Tuesday, February 28, 2012 3:04 PM
  • I'm not entirely sure I'm still following what is occurring, but a site collection will only run in a site that has been extended via SharePoint. It sounds as though the web application you are working with has, at some point, been extended to your main IIS web site. If that is not desired, I advise removing the web application from the site via SharePoint Central Administration and recreating it, only extending it to an IIS site that gets created through SharePoint during that process.

    Regards,

    Jerad Plesuk
    Technical Support | SharePoint Technologies | Microsoft Corporation
    -----------------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights


    Friday, March 02, 2012 9:01 PM