Welcome to Professional ASP.NET - Chris Love's Official Blog Sign in | Join | Help

Chris Love's Official ASP.NET Blog

Chris Love's Helpful tips, tricks and pragmatic development knowledge for the ASP.NET world.
Add to Technorati Favorites


ASP Insider
Configure IIS for Wildcard Extensions in ASP.NET

I get asked this question a lot as I go around demonstrating the benefits of using URL Rewriting in ASP.NET, how can I process wildcard extensions and just directories in IIS 6.0 on Windows 2003 and ASP.NET? It is very simple, but not obvious at all. This entry will walk you through configuring IIS to process all request through the ASP.NET engine.

The first thing you must have is access to the IIS Management console and Administrator privileges to the web server. Once you have these things in place you need to open the properties dialog for the Web site you will be configuring.

IIS Web Site Properties Dialog

IIS Web Site Properties Dialog

Select the 'Home Directory' tab. Once on this tab select the 'Configuration' Button. This will display a three tab dialog, the first tab, Mappings is what we are interested in. Notice the lower portion of the tab list 'Wildcard Application Maps', here we will want to add a reference to the ASP.NET engine. The easy way to do this is to double click on one of the ISAPI extensions in the top portion and copying the path to the ASP.NET .dll file. You will need to select one of the ASP.NET file extensions, like .ascx or .asax to do this. The path should look something like this: DRIVE:\%windows%\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll.

IIS Web Site Configuration Dialog

IIS Web Site Configuration Dialog

Now that we have copied the path to the .NET engine we need to add it to the Wildcard mappings. Select the Insert button to the right of the mappings list. Now you will have an Add/Edit Application Extension Mapping dialog displayed. There are two pieces of information you need to supply, the ASP.NET engine path and uncheck 'Verify File Exists'. Now select 'OK' until all the property windows are closed.

IIS Wildcard Application Extension Mapping Dialog

IIS Wildcard Application Extension Mapping Dialog

Now all URL requests to the web site will be processed by ASP.NET no matter what the extension or lack of extension. Pay attention for my next entry on how to leverage this feature to map URLs without extensions to actual dynamic pages on your Web site.

Reference - Installing Wildcard Mappings in IIS 6.0

kick it on DotNetKicks.com
Posted: Friday, July 27, 2007 9:49 PM

by Chris Love
Filed under: ,

Comments

Chris Love's Official Blog - Professional ASP.NET said:

Back in July I made a post about configuring IIS to handle Wildcard mapping through ASP.NET . I promised

# September 3, 2007 1:33 PM

Chris Love's Official Blog - Professional ASP.NET said:

Back in July I made a post about configuring IIS to handle Wildcard mapping through ASP.NET . I promised

# September 3, 2007 1:34 PM

DotNetKicks.com said:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# September 4, 2007 2:14 PM

Chris Love's Official Blog - Professional ASP.NET said:

To continue with my series on httpHandlers I want to cover how to stream a vCard to the user based on

# September 23, 2007 8:23 PM

Frank said:

Could you direct me to your post regarding: "Pay attention for my next entry on how to leverage this feature to map URLs without extensions to actual dynamic pages on your Web site."? Thanks!
# June 26, 2008 10:27 AM

Chris Love said:

Ahh, I did do it! http://professionalaspnet.com/archive/2007/07/27/Create-an-HttpModule-to-Process-Wildcard-Extension-Mapping-in-ASP.NET.aspx
# June 27, 2008 12:50 AM

Sandro Klostermann said:

Hi. I have a blog in Portuguese where I post about tools and ideas for developers who use Microsoft Visual Studio, ASP.NET, SQL Server, etc. I found this post and it's complementary to one entry I'm posting today (Jul/06). I'd like to have your permission to translate this entry and post it in my blog too. Thanks for your attention. Cheers!
# July 6, 2008 7:52 PM

Chris Love said:

Please do!!! Just let me know the URL so I can pass it along to some folks there and S. America. Fantastic.

# July 7, 2008 6:22 PM

Christopher Bennage said:

So we've been working on a web project for a friend's startup company (I don't like doing

# September 25, 2008 11:59 AM

Community Blogs said:

So we've been working on a web project for a friend's startup company (I don't like doing

# September 25, 2008 12:23 PM

otreians said:

You've been kicked (a good thing)
# November 1, 2008 3:39 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS