views:

2702

answers:

3

I am having a problem where I try to open my ASP.NET MVC application but I get the ASP.NET error page which says this:

**Server Error in '/' Application.

The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /EventScheduler/account.aspx/login

Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053**

I am using the URL trick from this blog post and that is why I have the .aspx in the URL:

http://blog.codeville.net/2008/07/04/options-for-deploying-aspnet-mvc-to-iis-6/

It works on my other sandbox server (not a dev machine) and now I just deployed it to my production site as a new virtual directory but for some reason it seems like it's actually looking for an aspx file. Any ideas? I think I must be forgetting a step

+1  A: 

Make sure you're not telling IIS to check and see if a file exists before serving it up. This one has bitten me a couple times. Do the following:

Open IIS manager. Right click on your MVC website and click properties. Open the Virtual Directory tab. Click the Configuration... button. Under Wildcard application maps, make sure you have a mapping to c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll. MAKE SURE "Verify the file exists" IS NOT CHECKED!

Will
Does this apply to IIS 6?
skb
Yes, it does. Minimum character lengths suck.
Will
I tried this, and the Windcard application map was not there. I added, making sure to UNCHECK the "Verify the file exists" checkbox, but I am still getting the same problem.
skb
It wasn't there? Sounds like you need to do some work configuring IIS. Unfortunately, it can be a pain in the ass. I'd suggest you go back to tutorials for configuring IIS for MVC and follow them step by step. The issue is outside of MVC; if it wasn't, you'd be getting an error about being unable to find the route or some other yellow screen of death.
Will
+1  A: 

If you're running IIS 6 and above, make sure the application pool your MVC app. is using is set to Integrated Managed Pipeline Mode. I had mine set to Classic by mistake and the same error occurred.

Igor Brejc
do you mean IIS7 and above. I can't find anywhere in IIS 6.0 to choose Classic or Integrated Managed Pipeline modes.
modernzombie
A: 

Had the same issue, in my case the cause was that the web.config file was missing in the virtual dir folder.

gabouy