3

I've followed all instructions from this topic and it still doesn't work . How to configure an MVC6 app to work on IIS?

If i enable Directory Browsing in IIS, I can see all files from wwwroot . If i disable it , I get this error :

HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.
Community
  • 1
  • 1
F Andrei
  • 668
  • 2
  • 9
  • 24
  • Is your default page set? – WorkSmarter Mar 07 '15 at 17:42
  • What default page ? I don't have pages in ASP MVC . Here are my default document settings in IIS : http://s21.postimg.org/vdb7ixinb/Untitled.png – F Andrei Mar 07 '15 at 17:57
  • I hope that you have map wwwroot from your publish directory. Also make sure that your web.config file present in wwwroot. – dotnetstep Mar 08 '15 at 06:36
  • Please provide screenshot of your folder structure within IIS. – WorkSmarter Mar 08 '15 at 08:33
  • Yes, I mapped wwwroot folder . Here's a screenshot with folder structure and IIS settings . http://s23.postimg.org/r3b425q0r/Untitled.png – F Andrei Mar 08 '15 at 10:56
  • Going by the error, looks like you are trying to access the `wwwroot` folder via the Url...is it?...if so, that is not the the way to do it...if you have a file like `banner.jpeg` under the `wwwroot\images` folder, you still should access it like `http://test.com//images/banner.jpeg` and not mention the `wwwroot` folder.. – Kiran Mar 09 '15 at 23:12
  • Did you have "Microsoft.AspNet.Server.IIS" in project.son? – Ricky Mar 10 '15 at 01:01
  • I have the exact same problem, did you find anything ? I tried with the ASP Starter Project from VS2015 and it worked ... – Christophe Gigax Mar 10 '15 at 16:12

1 Answers1

3

ASP 4.5 wasn't installed , even though i had ASP.NET options in IIS Control panel .

In order to install it you have to go to Add Roles and Features Web Server IIS / Web Server / Application Development and check ASP .NET 4.5 and .NET Extensibility 4.5 (i'm not sure if the last one is required)

The installation took a long time (more than one hour) and the server was freezing from time to time . After that everything worked fine .

F Andrei
  • 668
  • 2
  • 9
  • 24