[英]Running a VS 2017 project from VS 2019?
我是 Asp.Net 的新手。 我使用 VS 2017 制作了一個項目(更早),該項目運行良好(上次使用)。
最近,我將我的 VS 2017 更新為 VS 2019; 現在使用 VS 2019 我的項目沒有運行。
我早期的項目 (PersonDetails) 位於C:\\Users\\HP\\source\\repos\\PersonDetails
目錄中,該目錄包含以下文件和文件夾:
現在,當我嘗試在 VS 2019 中運行該項目時,在瀏覽器上顯示以下錯誤
HTTP 錯誤 403.14 - Forbidden Web 服務器配置為不列出此目錄的內容。
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 »
此外,當我在 VS 2019 中構建新項目時,它運行正常。 新項目(第一個)位於C:\\Users\\HP\\source\\repos\\first
目錄中,該目錄包含以下文件:
.vs
bin
obj
properties
appsettings.Developement.json
appsettings.json
first.csproj
first.sln
Program.cs
Startup.cs
為了在 VS 2019 中運行項目(PersonDetails),可以進行哪些可能的修改?
感謝那些願意提供幫助的人。 :-)
我不知道我是否正確理解了你的問題。 我以前也遇到過同樣的問題。 請單擊您的第一個項目(.sln 文件)並選擇使用 vs 2019 打開。之后,單擊解決方案資源管理器中的所有項目並選擇重新加載它們。 當您重新加載所有這些時,單擊您的主項目並選擇設置為開始。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.