0

I created a program with Visual Studio 2019 in Windows 10 Pro Build 19042.630 by Secure an ASP.NET Core Blazor WebAssembly hosted app with Identity Server, without applying any changes to the default template. I pressed F5 or Ctrl+F5 but browser did not show the home page in localhost and said This site can’t be reached ERR_CONNECTION_REFUSED. In debug tab SSL was Enable, but after I disabled it the home page rendered. Now I need SSL for Security, Identity Server and Can not work..

These solutions did not help me

  1. Visual Studio not debugging
  2. Enable SSL in Visual Studio - not prompted to install certificate
  3. https://www.hanselman.com/blog/working-with-ssl-at-development-time-is-easier-with-iisexpress
  4. https://www.pluralsight.com/guides/visual-studio-2017-resolving-ssl-tls-connections-problems-with-iis-express

Thanks a lot for your suggestions....

Panagiotis Kanavos
  • 120,703
  • 13
  • 188
  • 236
MhD hN
  • 1
  • 3
  • Post your code. The problem is caused because SSL was **disabled** by changes in the code. All Blazor projects have SSL enabled by default, so whatever the problem is, it wasn't caused by *enabling* SSL. That's why two ports are used when you run it, 5000 and 5001 with the cleartext one redirecting to the SSL port. Perhaps, when you added the Identity Server code you removed the redirection code – Panagiotis Kanavos Feb 17 '21 at 07:14
  • I just created my project from the template and started running it without changing a word at all – MhD hN Feb 17 '21 at 23:06

1 Answers1

0

By formating windows drive and installing windows and visual studio it finally worked.

MhD hN
  • 1
  • 3
  • I know that is not good answer but all things were correct and I had created some blazor server side projects which working and there weren't any acceptable reason for the ssl connection failure. – MhD hN Feb 17 '21 at 23:00