As this article

*Updated. (Thanks to the commenters):**

The easiest way to do it, especially if you don’t want to inherit anything from the parent Sitecore configuration down to your asp.net app is to use the <location /> config element with inheritInChildApplications="false". With this element you can wrap most config sections like <system.web />, <system.webserver />, etc:

image

It is worth mentioning that not all configuration sections can be wrapped into the <location /> element.

========================================

  • Open the web.config of your standalone web app.
  • Locate <httpHandlers>section under <system.web> and remove Sitecore specific http handlers:
<httpHandlers>
 <remove verb="*" path="sitecore_media.ashx"/>
 <remove verb="*" path="sitecore_xaml.ashx"/>
 <remove verb="*" path="sitecore_icon.ashx"/>
 ...
</httpHandlers>
  • Do the same thing for httpModules section:
<httpModules>
 <remove name="SitecoreHttpModule" />
 <remove name="SitecoreUploadWatcher" />
 <remove name="SitecoreXslWatcher" />
 <remove name="SitecoreLayoutWatcher" />
 <remove name="SitecoreConfigWatcher" />
 ...
</httpModules>
  • If you are running on IIS7 in integrated mode, you will need to the same thing for the <system.webServer> section:
<modules runAllManagedModulesForAllRequests="true">
 <remove name="SitecoreHttpModule" />
 <remove name="SitecoreUploadWatcher" />
 <remove name="SitecoreXslWatcher" />
 <remove name="SitecoreLayoutWatcher" />
 <remove name="SitecoreConfigWatcher" />
 ...
</modules>

 

<handlers>
 ...
 <remove name="Sitecore.MediaRequestHandler" />
 <remove name="Sitecore.XamlPageRequestHandler" />
 <remove name="Sitecore.IconRequestHandler" />
 ...
</handlers>

  - Your standalone app will most likely use its own membership provider(s), so you will need to disable Sitecore membership provider:

<membership defaultProvider="AspNetSqlMembershipProvider">
 <providers>
 <remove name="sitecore" />
 ...
 </providers>
</membership>
  • If neither role nor profile providers are used, disable them or if you do use them, add the remove statement the same way as it it shown above for the membership provider.
<profile enabled="false">
 ...
</profile>
<roleManager enabled="false">
 ...
</roleManager>

This way you can easily have an MVC app running in a virtual application (separate pool) of your Sitecore website.