Am trying to locally host an ASP.NET MVC project on IIS 10 (windows 10 machine). But when I try to access the site I get a "HTTP Error 403.14 - Forbidden" error. The contents of the Web.Config file as well as the error on the loading page are below. Is there something else am missing? Please suggest.
Update:
Finally I figured out the issue. This is a webapi project so in the Global.asax.cs I forgot to register the route for the MVC controller which am using.
Thank you for all the suggestions.
This check:
- ~\Views\todoapp
- ~\Views\todoapp\index.cshtml
- ~\Controllers\todoappController.cs
- ~\Controllers\todoappController.cs
-->
public ActionResult Index() { return View(); }
If the problem can not be found,Check this file:
Just create virtual directory of project and run it on IIS.
- Open Visual Studio
(Run as administrator)
.
- Select your site under IIS Express Sites.
- Right click on
Project / Site
and click on Properties
.
- Click on
Website
menu and New Virtual Directory
.
- Give Alias Name and Folder path.
- Save The Setting and click ok.
Now run same as given alias name and path
Like, http://localhost/ProjectName/Home/Index