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

Bob King 1 Reputation point

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:


Any help or ideas would be appreciated.

A set of technologies in the .NET Framework for building web applications and XML web services.
3,139 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.
772 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sam Wu-MSFT 5,931 Reputation points Microsoft Vendor

    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:



    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

    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