views:

2618

answers:

3

I'm struggling to get around the 404 errors from asp.net mvc beta when deploying on IIS 6. I had this working in one of the previews by mapping .mvc in IIS but this no longer works. I've read Omar's post and several others on the web and tried their solutions but no luck so far.

The home page opens without a problem on IIS 6 but others 404 and the site runs well on IIS 7.

Has anybody deployed asp.net mvc beta to IIS 6 with success? If so, what adjustments did you need to make to the code and/or IIS settings to get it to work?

A: 

I am so thankful I have not upgraded yet from CTP 5 :)

leppie
+14  A: 

I found a solution to my problem from Steve Sanderson's blog (Thanks Steve):

Option 1: Use a wildcard mapping for aspnet_isapi.dll This tells IIS 6 to process all requests using ASP.NET, so routing is always invoked, and there’s no problem. It’s dead easy to set up: open IIS manager, right-click your app, go to Properties, then Home Directory tab, then click Configuration. Under Wildcard application maps, click Insert (not Add, which is confusingly just above), then enter C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll for “Executable”, and uncheck Verify that file exists.

Guy
I just did this myself ... works great!
mattruma
Perfect! This solved my problem after an hour and a half of banging my head against a wall.
Chris Pebble
Great fix. Saved me A LOT of time. Thanks
Chops
What a pain that was! In the immortal words of Napoleon Dynamite: "Flippin' Sweet!"
Boydski
Wow... Thanks -- solved my problem immediately!
Andrew Flanagan
+1  A: 

Url rewriting can help you to solve the problem. I've implemented solution allowing to deploy MVC application at any IIS version even when virtual hosting is used. http://www.codeproject.com/KB/aspnet/iis-aspnet-url-rewriting.aspx

Alex Ilyin