Possible Duplicate:
ASP.NET MVC on IIS 7.5
I am trying to deploy a basic MVC 3 application to my 2008 R2 Server running iis 7.5 but receive a “403 – Forbidden” error trying to view my page.
I have anonymous authentication enabled, and my app pool is using the “ApplicationPoolIdentity” in integrated pipeline mode with .net 4.0. I don’t know what “user” the “ApplicationPoolIdentity” is, but I’ve given IUSR read/write rights to the website folder.
I don’t have any other authentication schemes in place, the server is not even running in a domain.
If I put a default html page in there, it loads fine. It’s only my methods/controllers that I cannot get to function.
How else can I troubleshoot this?
Thanks,
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Run aspnet_regiis -i. Often I’ve found you need to do that to get 4.0 apps to work. Open a command prompt:
cd cd WindowsMicrosoft .NETFrameworkv4.xxx.xxx aspnet_regiis -i
Once it has installed and registered, make sure you application is using an application pool that is set to .NET 4.0.
Method 2
Thanks Micheal for the help.
My OS is 64bit, so I ran aspnet_regiis.exe in Framework64 which solved the problem.
c:WindowsMicrosoft.NETFramework64v4.0.30319>
This was after running aspnet_regiis in folder …Frameworkv4.0.30319 which did not resolve the problem.
Method 3
Two things to try:
- Give permission to the directory in which your website is stored to “Network Services”. That’s the account that is used for ApplicationPoolIdentity in Server 2008.
- If that fails, change ApplicationPoolIdentity to an account for which you have given explicit permissions to your website directory.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0