LearnCode
LearnCode

Reputation: 445

HTTP Error 403.14 - Forbidden. Asp.NET MVC

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.

Web.configlanding page

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. Missing route config

Upvotes: 0

Views: 3183

Answers (3)

Badr Bellaj
Badr Bellaj

Reputation: 12821

Another cause for that is to have define

protected void Application_Start() 

as an Async function.

Upvotes: 0

DHARMRAJ THAKUR
DHARMRAJ THAKUR

Reputation: 82

Just create virtual directory of project and run it on IIS.

  1. Open Visual Studio (Run as administrator).
  2. Select your site under IIS Express Sites.
  3. Right click on Project / Site and click on Properties.
  4. Click on Website menu and New Virtual Directory.
  5. Give Alias Name and Folder path.
  6. Save The Setting and click ok.

Now run same as given alias name and path

Like, http://localhost/ProjectName/Home/Index

Upvotes: 1

M.R.T
M.R.T

Reputation: 805

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:

  • ~\Views\Web.config

Upvotes: 1

Related Questions