How I spent half a day trying to solve SSL connection error (ERR_SSL_PROTOCOL_ERROR)

Hope it helps someone to prevent spending a lot of time trying to solve SSL connection error problem during local site debugging.

My web.config contains rewrite section for https requests:

I tried (but it didn’t work):

  • Check localhost ssl certificate
  • Removing rewrite section
  • Clearing rules section after all existing rules
  • Removing localhost from chrome://net-internals/#hsts
  • Change web site port
  • Repairing IIS Express and Visual Studio

The solution was:

  • Just clear cache of your browser (CTRL + R didn’t help)
  • Delete applicationhosts.config in solution folder (.vs/config)

 

Azure Web Role recycling

On one machine, there was an error that didn’t reproduce on other devices.
Web Role can’t start in debug mode with recycling issue.

capture

First of all I checked EmulatorRuntime.log which located in “C:\Users\<user>\AppData\Local\dftmp\EmulatorRuntimeLogs”.

There was a message:

I spend a lot of time trying to fix this issue. Helpful links from stackoverflow.com:

But no one of this solutions solved my problem.

The problem was: Startup Task in ServiceDefinition.csdef made my role recycle.

Solution: So if you have problem with recycling check your startup tasks.