Friday, January 12, 2007

Adding web applications to a Sitecore IIS site

A problem one often faces when trying to install 3rd party web software (like MondoSearch) on a Sitecore website, is that any non-Sitecore related virtual directory or web-application place on the same IIS website will run into a lot of problems.
This is naturally due to the httpModules, httpHandlers and roleManagers set by the Sitecore Web.Config in the root of the website.
The easiest way to get around this (besides installing on another IIS Site, which can be difficult on an XP developer machine) is to put a web.config in the non-Sitecore related web-application that removes all of the modules, managers and handlers set by Sitecore.

For a default installation of the Sitecore 5.3 demo-site, Printers Inc. this would be:


<httpModules>
<remove name="SitecoreHttpModule" />
<remove name="SitecoreUploadWatcher" />
<remove name="SitecoreXslWatcher" />
<remove name="SitecoreLayoutWatcher" />
<remove name="SitecoreConfigWatcher" />
<remove name="StatCenterPersonalizer" />
</httpModules>
<roleManager enabled="false">
<providers>
<clear />
</providers>
</roleManager>
<httpHandlers>
<remove verb="*" path="sitecore_media.ashx"/>
</httpHandlers>


In other installations / versions this might vary a bit, but you can always check the sitecore web.config and see whats added, so you can then remove it.

1 comment:

Lars Fløe Nielsen said...

This is really nice. Good point. I think we should add this to our documentation.

Thanks. And welcome in the Blogging sphere!