Iis express the connection was reset

I'm using the new Visual Studio 2013 with IISExpress for the first time (previously used ASP.net Development server on VS2010). I'm running into issues trying to debug my project.

This is what I see in Chrome:

Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have.
Error code: ERR_SSL_PROTOCOL_ERROR

I updated my Properies -> web file so that the Project Url uses a https URL now. However, after doing that, I now get a new error when launching:

The connection to localhost was interrupted.
Error code: ERR_CONNECTION_RESET

Thanks

So I've been trying to setup the dev environment for my ASP .NET Core web API during the last few days and I'm almost there but I'm just stuck. Everything should be working ; my application is setup to log to a local file so I can see what's going on.

When I send a request, the db context gets initialized as normal when it needs to (depending on whether a new process is created in the application pool) and then sends the response. Everything is perfectly fine actually, the status code for the response is 200, everything works, but the actual response I get in my client browser is, well : "the connection has been reset".

My IIS settings:

  • HTTPS required for my ASP .NET Core app

  • Self-signed certificate manually approved

  • Bindings :

    • http on port 80

    • https on port 443 with TLS 1.3, etc (supported by my browser), using previous certificate

  • SSL is not required for now

  • I've tried with no firewall

  • No HSTS in IIS, though I have UseHsts() and UseHttpsRedirection() in my Program.cs

  • Anonymous authentication only ; set to pool identity

  • Compression set to dynamic and static

  • Application pool : no managed code

  • Limits : all to default, connection timeout 120 seconds

How Do I Restore A Missing Iis Express Ssl Certificate? (The Connection Was Reset.) With Code Examples

Good day, guys. In this post, we’ll look at how to solve the How Do I Restore A Missing Iis Express Ssl Certificate? (The Connection Was Reset.) programming puzzle.

cd C:\Program Files (x86)\IIS Express
IisExpressAdminCmd.exe setupsslUrl -url:urlToYourSite -UseSelfSigned

In order to solve the How Do I Restore A Missing Iis Express Ssl Certificate? (The Connection Was Reset.) issue, we looked at a variety of cases.

HOW TO : Recover deleted SSL certs from IIS

  • Open a MMC console by typing “mmc” in the Start –> Run prompt.
  • In the MMC console, click on File -> Add/Remove Snap-in.
  • In the “Add/Remove Snap-in” window, click on Add.
  • Choose the “certificate” snap-on and click on Add.

How do I restore an SSL certificate?

Restoring the Default SSL Certificate and Private Key

  • Go to Control Panel > System > Security > Certificate & Private Key.
  • Click Restore to Default. A confirmation message appears.
  • Click OK.

How do I resolve certificate error in IIS?

Our sysadmin solved this by installing the internal certificate to the "computer" store like this:

  • Start mmc.
  • Add snap-in Certificates.
  • Choose ComputerAccount.
  • Navigate to Trusted Root Certification Authorities -> Certificates and right-click.
  • Choose All tasks-> Import.
  • Select your own root-certificate file.

Where is IIS Express certificate stored?

During the initial installation of Visual Studio, Internet Information Services (IIS) Express installs a self-signed certificate into the Certificates (Local Computer)\Personal\Certificates folder if a certificate doesn't already exist.07-May-2022

How do I reinstall certificates?

Reinstalling Certificate Services

  • From the Start menu, click Control Panel and click Add or Remove Programs.
  • In the Add or Remove Programs window, click Add/Remove Windows Components.
  • In the Windows Components Wizard, in the Windows Components list, select the Certificate Services check box.

How do I download IIS Express Development certificate?

Browse to https://localhost:44300/ (or whatever port IIS Express is using) using Internet Explorer and click Continue to this website:

  • Click on Certificate error in the address bar, and then click View certificates:
  • When the Certificate dialog box is displayed, click Install Certificate:

How do I restore the private key of an SSL certificate in an IIS environment?

Use the following steps to add the Certificates snap-in:

  • Click Start, and then search for Run.
  • Type in mmc and click OK.
  • From the File menu, choose Add/Remove Snap-in.
  • Select Certificates and then Add.
  • Choose the Computer account option and click Next.
  • Select Local Computer and then click Finish.

What are the steps to recover the private key of an SSL certificate in an IIS environment?

Why is my SSL certificate revoked?

Certificate revocation is the act of invalidating a TLS/SSL before its scheduled expiration date. A certificate should be revoked immediately when its private key shows signs of being compromised. It should also be revoked when the domain for which it was issued is no longer operational.

How do I fix a SSL certificate issue?

How to Fix SSL Certificate Error

  • Diagnose the problem with an online tool.
  • Install an intermediate certificate on your web server.
  • Generate a new Certificate Signing Request.
  • Upgrade to a dedicated IP address.
  • Get a wildcard SSL certificate.
  • Change all URLS to HTTPS.
  • Renew your SSL certificate.