Return to doc.sitecore.com

Valid for Sitecore 5.3, 5.2
Adding web applications to a Sitecore IIS site

Q: 

On our site I have created a virtual directory with an ASP.NET application that has nothing to do with Sitecore at all. It is a stand-alone application that is using no Sitecore functionality. I get the following error when accessing pages in the virtual directory - why?

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: File or assembly name Sitecore.HttpModule, or one of its dependencies, was not found.
Source Error:

Line 731:    <!-- Sitecore  http modules-->
Line 732:    <httpModules>
Line 733:      <add type="Sitecore.HttpModule, Sitecore.HttpModule" name="SitecoreHttpModule" />
Line 734:      <add type="Sitecore.Scheduler, Sitecore.Scheduler" name="SitecoreScheduler" />
Line 735:      <add type="StatCenter.StatCenterModule, StatCenter.Frontend" name="StatCenterPersonalizer" />

A:

The error occurs due to the httpModules, httpHandlers and roleManagers set by the Sitecore web.config in the root of the website.

Resolution:

The official recommendation for this problem is:

Sitecore does not support virtual directories in any way. You should dedicate a separate Web Site just for Sitecore.

However, if you deploy Sitecore-based solution on machine running Windows XP (which is limited to just one site) and it is absolutely necessary to deploy another web application on the same server, you can resort to the following solution.

Put

<location inheritInChildApplications="false">

</location>

around the <system.web> node in the web.config of the Sitecore root as shown below:

<location inheritInChildApplications="false">
  <system.web>
  ...
  </system.web>
</location>

There is no need to copy the sitecore libraries into the child application’s folder, and no additional modifications need to be made to the web.config in the child application.