Deploying MVC 4 application on localhost gives HTTP 404 error

Using Visual Studio 2012 Express in Windows 7, I created a new project from the MVC 4 Internet application template, then I used simple membership and successfully passed authentication.

Then, to try the simplest deployment path , as a first step, I tried the application on localhost by following these steps:

  • published a project using the file system publishing method ,
  • intended for the new folder: "C: \ inetpub \ wwwroot \ MyApp",
  • copied the App_Data folder to the folder "C: \ inetpub \ wwwroot \ MyApp",
  • Permission granted IIS_IUSRS to the folder "MyApp".

Since the database is a type of SQL CE, I think that there is nothing that could be changed in the connectionString section of web.config.

The publication stopped until the last step: loading the browser, I received the following error:

Not found

HTTP Error 404. The requested resource was not found. - with error code: 0x80070002

I could not find the answer to this problem on Google for a limited time. Please advise what can be done?

+4
source share
1 answer

As stated in my comments, make sure your URL is properly formatted in the project properties. Also, make sure to create a default start page (if you don't have a pointer in the main controller).

+2
source

Source: https://habr.com/ru/post/1447717/


All Articles