简体   繁体   中英

Visual Studio 2019 can debug one web site but not another on the same server... why?

I'm running the latest version of Visual Studio 2019 on a Windows 2019 Datacenter in Azure. I have two IIS web sites, development and production, in C#, which are currently identical on that server and both reside on the d: drive in different folders under inetpub. Both use the same wildcard certificate and force https.

I have been able to debug both in the past but for some reason I cannot debug dev now. Trying to start in debug mode, it says "Unable to start debugging on the web server. The remote server returned an error: (403) Forbidden". I'm not aware that I've changed anything on the server/IIS.

I can debug the production web, same server, same source code, same VS. I just change Properties -> Web -> Project Url from dev.domain.com to prod.domain.com.

So, I created a third web site, pointed it to the same physical location as dev and it gives me the same error as the original dev site. I would think this would mean there is something in that path or configuration somewhere that's off. I don't know where to look to check.

Often, this error occurs because an error or configuration change has occurred that requires an update to your Application Pools, an IIS reset, or both. You can reset IIS by opening an elevated command prompt and typing iisreset .

More infor about how to troubleshoot this error you can refer to this link: Error: Unable to Start Debugging on the Web Server .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM