Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Scenario: Clean Server 2008 R2 Install with IIS Role.

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

executed

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

share|improve this question
    
Have you made sure you're default document is in the default documents list? –  Brent Pabst 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. –  Brent Pabst 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
    
And when you installed IIS you made sure to include all of the ASP.NET related application programming stuff right? The ASP.NET ISAPI filters are all turned on right? –  Brent Pabst Jul 6 '12 at 16:29

1 Answer 1

up vote 16 down vote accepted

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

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/> 
</system.webServer>

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

share|improve this answer
    
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. –  NateTheGreat Jun 11 '13 at 23:01
    
For me also runAllManagedModulesForAllRequests didn't help, but the hotfix did - thanks for the link –  Anil Purswani Nov 11 '13 at 7:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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