This site can’t provide a secure connection

WebSpider 76 Reputation points

Hi guys... i getting this error message when i open my web application after i installed visual studio 2019.

This site can’t provide a secure connection

I have tried changing my web.config to the following but failed.

    <rule name="HTTP to HTTPS Redirect" stopProcessing="true">
      <match url="(.*)" />
         <add input="{HTTP_HOST}" pattern="localhost" negate="true" />
         <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" />
Internet Information Services
{count} vote

Accepted answer
  1. HuryShen - MSFT 321 Reputation points

    Hi @WebSpider ,

    You can right click your application in visual studio and click "Properties".

    Then click "Web" tab and you can find "Project Url" input box. Change the url in this input box from original http://localhost:50997 to https://localhost:44366.


    After that, you do not need to change port number manually when you start the application in visual studio. It will browse with https://localhost:44366 automatically.

    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.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. WebSpider 76 Reputation points

    hi @HuryShen - MSFT

    Not sure why its show different screen when i right click and Properties