0

I published an intranet on IIS 7.5. If I try to go to the website, I get "403 - Forbidden: Access is denied - You do not have permission to view this directory or page using the credentials that you supplied".

If I right click on the application folder on IIS Manager and go to Manage Application and then Browse, I get "HTTP Error 403.14 - Forbidden - The Web server is configured to not list the contents of this directory". It then proceeds to tell me that A default document is not configured etc. etc. I do have a default document listed in the web.config file as follows:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
    <directoryBrowse enabled="false" />
    <modules runAllManagedModulesForAllRequests="true" />
    <defaultDocument>
        <files>
            <add value="Index.cshtml" />
        </files>
    </defaultDocument>
</system.webServer>
</configuration>

What am I doing wrong? Many thanks.

tereško
  • 58,060
  • 25
  • 98
  • 150
user3041439
  • 153
  • 2
  • 2
  • 15
  • Could you please have a look at my answer on [ASP MVC in IIS 7 results in: HTTP Error 403.14 - Forbidden](http://stackoverflow.com/questions/1741439/asp-mvc-in-iis-7-results-in-http-error-403-14-forbidden/41363973#41363973). – Murat Yıldız Dec 28 '16 at 14:24

2 Answers2

0

check the folders permissions: right click on the folder, click on properties go to Security and add the appropriate user (like IUSR_...). hope it helps.

Shlo
  • 1,036
  • 2
  • 10
  • 23
  • Thanks. Permissions seem to be fine as as per previous applications already published. So unsure what is so special about this one. This is the first MVC app being published. The previous ones were old style ASP.Net apps. – user3041439 Dec 16 '13 at 11:39
0

It turned out I was publishing the app completely the wrong way. I was going by how previous ASP.Net apps created as Websites and not Solutions were published. This MVC app needed to be placed in inetpub/wwwroot folder in the server. If I published through Visual Studio I think this would have happened anyway. I didn't have VS in the server. So I placed the files manually there (just copied from my local inetpub/wwwroot since I successfully published there earlier). The last thing I needed to do was go to IIS Manager and converting the project folder into an Application. Now cooking on gas.

user3041439
  • 153
  • 2
  • 2
  • 15