4
votes

I am running a Asp .Net website under IIS 7.5 - win 7, IIS 8.5 - win 8.1. I have 2 development machines witch run it normally.

  1. Steps to recreate the environment After a fresh install of Win 7 on another machine. Installed all updates

    Added IIS Feature with

    • .Net extensebility
    • Asp
    • CGI
    • ISAPI Extensions
    • ISAPI Filters

    Registered .Net framework 4.0 with IIS(aspnet_regiis -i/aspnet_regiis -ir)

Added correct application pool to website.

Set the path to bin folder of the project.

in web.config set:

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

Aded IIS/IIS_USRS read-Write rights on the specific folder

*Note: I do not need Directory Browsing enabled

  1. The Problem
    • On all new OS Installs, no mater what win version (7, 8, 8.1, or 10 Preview) I got the same error ****HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.****

If anyone can help because I am running out of places to look for the problem.

*Note - Same setting work fine on 3 development machines with win 7 and server 2008. If I deploy a Publish it works fine. (Containing .aspx pages)

Thank You

2
I have exactly the same problem (IIS 8.5, clean install). MVC Web apps work fine on dev machine - but server always returns 404.13. And likewise I have been through all the "traditional" remedies for this problem, to no avail ...Geeb

2 Answers

10
votes

As I said in my comment below the OP I had tried everything on the list of usual suspects. After losing literally days of my life wrestling with this problem, this is what fixed it for me:-

For some reason best know to the malevolent forces of dotNet, publishing my web apps with the setting Precompile during publishing checked (found in the File Publish Options in the Settings tab of the publish dialog in VS 2012) caused certain of the MVC apps to use the wrong handler. It was almost as though IIS "forgot" they were MVC apps.

A small text file called:

PrecompiledApp.config

was created in the root directory of the malfunctioning app.

Deleting this text file and subsequently publishing without the pre-compile setting brought the malfunctioning apps back to normal!

I have not the faintest clue why this option should cause such a detrimental effect, but this seemed to be the cause.

(I also set all the references to the MVC dependencies as "copy local", but this is on the "usual suspect" list of things to do.)

As with most things dotNet related fixing such mysterious problems as these requires days of banging one's head against a wall randomly altering settings until one makes a difference. There is usually no logical reason for, or documented example of, the error in question, and you are just left with voodoo, hearsay and trawling sites like SO for an answer.

Gimme open source software any day...

1
votes

On windows 8.1, IIS 8.5 i got the same error.

I googled and found this video: https://www.youtube.com/watch?v=OmQlO0daduE&feature=youtube_gdata

My Default.aspx was Defeult.aspx with an a->e typeo - fixed it. And now it works.

Tho, I get it, it's still a strange error. Maby should have been something like - "Couldn't find any of the default start pages defined in 'Default Document' and with a - how to change link"