Scenario: Clean Server 2008 R2 Install with IIS Role.

Installed Framework 3.5 (Server Features) Installed Framework 4.5 RC (MS Download)


C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -i

(I'd use -iru on existing servers but this is a clean build).

Published via File System (SMB share)

Converted the folder into an application using the .Net 4.0 Integrated App Pool

Stopped/restarted everything.

Browsing to localhost/TestApp results in a 403.14 (Directory browsing forbidden)

What step have I missed out? The site in question is MVC4 and targets the 4.5 RC framework

  • Have you made sure you're default document is in the default documents list? Jul 6 '12 at 14:23
  • @BrentPabst Being MVC, there isn't a default document - it relies on URL rewriting by IIS to determine which controller/action to execute. If that was failing, I'd expect a different error message. It feels like Url parsing isn't being invoked which usually means .Net isn't registered properly in IIS. Having said that, it is registered and I've installed the appropriate IIS Roles (actually, I've now got all the IIS roles) so I'm a little unsure how best to diagnose this
    – Basic
    Jul 6 '12 at 14:39
  • sorry, I'm blind and missed the 4.5 MVC part. Either way, why did you register .NET 4.0 after installing 4.5? I've never actually had to register .NET on any web server because the installer does it automatically. Anyway, I think you registered the wrong .NET handlers. However, with 4.5 and MVC you should at least be seeing a YSOD that says the global ASAX can't be loaded. Jul 6 '12 at 15:13
  • @BrentPabst I've had to aspnet_regiis before but only when IIS is installed after .Net (seems reasonable). That wasn't the case here but since so many of the suggested answers mention this as the problem, I thought I'd give it a go. 4.5 replace 4.0 entirely. I agree not getting YSOD is odd - As I said, it looks like it's just not treating it as a .Net page at all
    – Basic
    Jul 6 '12 at 15:25
  • 1
    Glad you got it all worked out. Your head must have been ready to explode! Jul 8 '12 at 2:04

I had a similar problem. This thread https://stackoverflow.com/questions/2374957/asp-net-mvc-on-iis-7-5 solved it for me. Basically try adding this to your web.config:

    <modules runAllManagedModulesForAllRequests="true"/> 

If that work you can try removing it and install this hotfix instead: http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=5272

  • Thank you, that solved it. I've been beating my head against this for hours. You wouldn't believe the grief I've received from the office "linux guy". In this case, I think he has a point...
    – Basic
    Jul 6 '12 at 23:52
  • 1
    Thank you! In my case, runAllManagedModulesForAllRequests didn't help, but the hotfix did. Jun 11 '13 at 23:01
  • For me also runAllManagedModulesForAllRequests didn't help, but the hotfix did - thanks for the link Nov 11 '13 at 7:17
  • You saved my day!
    – labilbe
    Sep 23 '15 at 9:10

The UI is a bit different in the newer versions of Windows Server. Here is where you have to enable ASP.Net in order to get it working on IIS

Fix IIS & Asp.net

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.