Running a VS 2017 project from VS 2019?

0

I'm new to Asp.Net. I made a project (earlier) using VS 2017 which was working fine(last used).

Recently, I updated my VS 2017 to VS 2019; and now using VS 2019 my project is not running.

My earlier project (PersonDetails) resides in C:\Users\HP\source\repos\PersonDetails directory which contains the following files and folders:

  • .vs
  • packages
  • PersonDetails
  • PersonDetails.sln

Now when I try to run the project in VS 2019, on the browser it is displaying the following error

HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory.

Most likely causes:
A default document is not configured for the requested URL, and directory browsing is not enabled on the server.

Things you can try:
If you do not want to enable directory browsing, ensure that a default document is configured and that the file exists.
Enable directory browsing.
Go to the IIS Express install directory.
Run appcmd set config /section:system.webServer/directoryBrowse /enabled:true to enable directory browsing at the server level.
Run appcmd set config ["SITE_NAME"] /section:system.webServer/directoryBrowse /enabled:true to enable directory browsing at the site level.
Verify that the configuration/system.webServer/directoryBrowse@enabled attribute is set to true in the site or application configuration file.

Detailed Error Information:
Module     DirectoryListingModule
Notification       ExecuteRequestHandler
Handler    StaticFile
Error Code     0x00000000
Requested URL      http://localhost:49236/
Physical Path      C:\Users\HP\source\repos\PersonDetails\PersonDetails
Logon Method       Anonymous
Logon User     Anonymous

More Information:
This error occurs when a document is not specified in the URL, no default document is specified for the Web site or application, and directory listing is not enabled for the Web site or application. This setting may be disabled on purpose to secure the contents of the server.
View more information ยป

Also when I'm building a new project in VS 2019 it is running properly. The new project (first) resides in C:\Users\HP\source\repos\first directory which has following files:

.vs

bin

obj

properties

appsettings.Developement.json

appsettings.json

first.csproj

first.sln

Program.cs

Startup.cs

WHAT COULD BE THE POSSIBLE MODIFICATIONS THAT COULD BE MADE IN ORDER TO RUN THE PROJECT (PersonDetails) IN VS 2019 ?

Thanx to those willing to help. :-)

asp.net
asp.net-mvc
visual-studio-2019
asked on Stack Overflow Aug 23, 2019 by Priyanka Das • edited Aug 24, 2019 by A. Nadjar

1 Answer

0

I don't know if I understood your question correctly. I had the same problems before. Please click on your first project (.sln file) and choose to open with vs 2019. After that, click on all projects that are in your solution explorer and choose to reload them. When you reload all of them, click on your main project and choose to set as start.

answered on Stack Overflow Aug 21, 2020 by alireza sariri • edited Aug 21, 2020 by PachecoDt

User contributions licensed under CC BY-SA 3.0