14

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?

1
  • 2
    For S&G's... check your wildcard mapping. Is that little checkbox "Check that File Exists" checked? I hate that little bastard. Commented Oct 27, 2008 at 14:52

3 Answers 3

26

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

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 (run -> inetmgr -> OK)
  • 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.
Sign up to request clarification or add additional context in comments.

3 Comments

Perfect! This solved my problem after an hour and a half of banging my head against a wall.
Great fix. Saved me A LOT of time. Thanks
What a pain that was! In the immortal words of Napoleon Dynamite: "Flippin' Sweet!"
5

I can't seem to write comments yet. So I'll write a new answer.

There are a few similar questions going around on stackoverflow. I'm using MVC 3. I know the question was MVC 2 related. But since this is the first stackoverflow post I bumped in to, I think it's worth mentioning that:

  • when you use MVC 3, you need to add a new extension mapping with the executable of the .NET 4 framework (C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll)

<edit>I just found out that I even don't need to set up the extension mapping. </edit>

  • It still didn't work for me then :) I still had to 'Allow' ASP.NET v4.0.30319 in the Web Service Extensions section in IIS:
    • open IIS
    • click on the server node
    • open the Web Service Extensions section
    • select the ASP.NET v4.0....
    • right click --> Allow Good to go!

1 Comment

Thank you, that Web Service Extensions helped me out. Why would it default to Prohibited on a fresh install??
1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.