Error debugging web app IISExpress in VS 2019 "The connection for this site is not secure"

Bob King 1 Reputation point
2021-09-29T15:09:27.437+00:00

I'm getting an intermittent (but most of the time) error when trying to debug a web app with local IIS (Edge), and can't find any info on what might be happening.

I'm a local admin, running VS 2019 as Admin on Win 10, and have verified that my Virtual Directory settings are correct. This is a shared project running OK for others, so I know it has to be something local.

Here's the error:

136260-screenshot-2021-09-29-110725.png

Any help or ideas would be appreciated.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,663 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
1,006 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sam Wu-MSFT 7,536 Reputation points Microsoft Vendor
    2021-09-30T02:01:16.897+00:00

    Hi @Bob King

    You can try to create new Virtual Directory:

    1. Open visual studio, select your project.
    2. right-click on the project and select properties.
    3. click Create Virtual Directory.
    4. make sure there no such setting in your web.conifg file like below:

    136458-4.png

    136389-3.png


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. KARTIKISOP 96 Reputation points
    2021-09-29T15:12:34.957+00:00

    Maybe your internet is not set to the right settings.
    That happened to me as well. But had to change my network settings.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.