So I have all the updated code, the entire solution builds. It works on everyone else’s machine, however when I try and access localhost/extranet on my machine, it gives me this error:
HTTP Error 403.14 – Forbidden
Detail Error Info:
Module DirectoryListingModule Notification ExecuteRequestHandler Handler 0x00000000 Requested URL http://localhost:80/extranet/ Physical Path C:svnK2trunkappteamwebChatham.Web.UI.Extranet Logon Method Anonymous Logon User Anonymous
Now I tried going into IIS7, and enabling directory browsing, this removed the error, but still didn’t bring up my website. I also tried going in and disabling the default document, re-enabling it, everything, nothing worked. I’ve also restarted IIS a few times to no avail.
Any ideas?
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
It sounds like your IIS is not processing the routing rules for your application and is trying to find a default.aspx, index.htm, etc. Since it cannot, it is wanting to display the directory listings (which is why you were getting the 404.14).
I just checked my dev setup and I think that your AppPool has to be set on Integrated as opposed to Classic on the Managed Pipeline for the AppPool. I have ran into this before, there may be ways to use the Classic Pipeline, but this would/should be the quickest way to resolve your issue. To check/change the pipeline mode, click on Application Pools from the menu on the left side of IIS, find your AppPool and look in the managed pipeline column. If it is set to Classic -> Right click the AppPool, choose basic settings, then change the dropdown from Classic to Integrated.
If I am incorrect, someone please feel free to correct me on this in the comments.
Edit – Just to add, you can run an MVC app in the Classic Pipeline mode, but you have to do the IIS 6 tricks to get it to work properly. Mainly, you need to turn on wildcard script mapping for MVC to work in Classic mode, If not it expects an .aspx file (or similar) to exist for it to handle the execution pipeline over to .NET from IIS.
Method 2
Causes this error is removed Global.asax file from your root directory of your site.
To solve this problem add a Global.asax file to your project.
See here: How to add Global.asax file to ASP.NET MVC4 project
Method 3
In IIS, you need to find out which app pool your application is running from. Just right click the web application under Sites>Manage Web Site>Advanced Settings. The first property should be the app pool.
Now, click Application Pools. You should see a column called “Identity”. Add that user to the ACL of the C:svnK2trunkappteamwebChatham.Web.UI.Extranet directory. If it just says ‘ApplicationPoolIdentity’, it can be a little tricky figuring out the user. If it’s just running under DefaultAppPool, you can use IIS AppPoolDefaultAppPool.
Method 4
My solution was because I didn’t have ASP.NET installed via “Turn Windows Features on and Off” so it was simple. I figured it out by enabling directory browser and trying to go to my views folder which then gave a more descriptive answer and pretty much said that there was a problem with a module because ASP.NET is not properly installed. It then dawned on my to go and install it.
Method 5
Change the ‘start page’ by right click on the page and select ‘Set as Start Page’ that you want to open first when the web application starts first. This might solve your problem. 🙂
Method 6
Also make sure in IIS Application Pool settings that Enabled 32-bit Applications under Advanced Settings is set to FALSE. I spent hours trying to fix this and that was my issue. Windows Server 2012 IIS 8.5
Method 7
I solved this problem by setting exact .net framework. My website was using v4.0 version of .net.
- Workaround to handle the problem:
- Open command line as an administrator
- Go to directory “C:WindowsMicrosoft.NETFrameworkv4.0.30319”
- Execute the following: aspnet_regiis.exe -i
- Open IIS and change Pipeline Mode of Your application to Integrated
Hope this helps
Method 8
In my case the HTTP Redirection feature was missing on the server (with IIS 10).
Adding the feature resolved the issue and the site started to load fine.
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
