Iis – Deploying ASP.NET MVC to Windows Server 2003

iismvc

I have a problem with an MVC 2 website on Windows Server 2003 running IIS 6. It is externally hosted, but we have a 2003 server internally for testing. The internal server runs the website fine, the external server gives a 403 ("website declined to show this page") error when navigating to the root of the site (in IE – FireFox says 'directory listing denied'), and a 404 if I try to navigate directly to a page resource.

I have tried the wildcard ISAPI mapping and extension mapping, and a couple of other common checks (I forget exactly which now, most of them were already set correctly), but so far no joy. All the settings can be replicated on our internal server and the pages return properly.

IIS logs just show exactly what the browser shows – 404 errors and 403s. If I turn on Directory Browsing in IIS, both Firefox and IE show the directory list, as expected, but getting to a page either directly or via MVC routes still fails.

I've read about a different level of trust required for an MVC application compared to a WebForms application – how can I check permissions and trust levels on the external and internal servers (assuming I am able to check that) and if that would cause these errors, what are the minimum levels that MVC require?

Failing that, what else might be causing this error for me to try out?

Best Answer

Have found the solution - after a colleague sat down with me and made me go over the previous solutions again. Turns out I had missed the Global.asax file in deploying facepalm. I thought it was compiled into the dll, but it appears the physical file is still necessary.

I've seen other people trying to solve similar issues, hopefully they'll find this blindingly simple fix!

Related Topic