How to use Dot Net Dash with IIS 7 Integrated Managed Pipeline Mode

IIS 7 provides a new request processing pipeline mode known as Integrated Managed Pipeline Mode. Whereas previous versions of IIS require an ISAPI extension (and therefore a separate server pipeline) to map server requests to your Asp.Net application, IIS7 allows you to run your application under "Integrated" mode, which integrates the Asp.Net runtime with the core web server.

Dot Net Dash relies on Microsoft's Url Routing libraries and runs on IIS 6 or IIS 7. The configuration settings (web.config) to enable Url Routing on an IIS 7 server using Integrated Managed Pipeline Mode, however are slightly different than those for the Asp.Net Development Server, IIS 7 under Classic Managed Pipeline Mode and previous versions of IIS which are discussed here.

If you get an "Unhandled Error in Silverlight Application Code: 2104" javascript error when trying to render the control on your IIS 7 production environment, you should check the Managed Pipeline Mode of your server. By default, new sites on IIS 7 will use Integrated Managed Pipeline Mode.

The Dot Net Dash control emits HTML for a Silverlight Object Tag whose source property is set to /web_management.aspx/xap/dotNetDash.xap. This resource is only available when Url Routing is properly configured.

How to know whether IIS 7 is running in Integrated Managed Pipeline Mode

In IIS Manager, click on the Application Pools node in the web server tree view to see a list of application pools for your server.

IIS 7 Application Pools Node

IIS will display a list of application pools along with their status, identity and Managed Pipeline Mode. Notice in the illustration below that two of the application pools are running in Classic Managed Pipeline Mode and one is running in Integrated mode.

IIS 7 Application Pools

How to configure your web application for IIS 7 Integrated Managed Pipeline Mode

While in development mode, you may have configured Url Routing by adding the UrlRoutingModule to the httpModules element of the "system.web" section of web.config. This configuration will work on the Asp.Net Development Server, IIS 6 and also on IIS 7 under Classic Managed Pipeline Mode.

On your IIS 7 production server (if using Integrated Managed Pipeline Mode), you need to instead add elements to the "system.webServer" section of web.config. You'll need to add both a UrlRoutingModule and a UrlRoutingHandler to the "modules" and "handlers" elements of "system.webServer" as shown here:

UrlRoutingModule entry for Integrated Managed Pipeline mode in web.config

The above image illustrates a complete "system.webServer" section of web.config. Yours may have additional elements such as a script handler. For your convenience, you can copy/paste the UrlRouting Module element from here:

<add ="UrlRoutingModule" ="System.Web.Routing.UrlRoutingModule, System.Web.Routing, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

And you can copy/paste the UrlRoutingHandler element from here:

<add ="UrlRoutingHandler" ="integratedMode" ="*" ="UrlRouting.axd" ="System.Web.HttpForbiddenHandler, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

Quick Links

Free download
Asp.Net Admin Tools
Asp.Net Membership and Roles Administration tool

Did you know?

Dot Net Dash gives you instant management of your Asp.Net web applications.