This site can't be reached error

Viewed 31398

I have an asp.net MVC project developed in VS2015. Now I try to run it in VS2017 and get an error:

This site can't be reached.

What can I do with this trouble?

10 Answers

In my case IIS Express is not allowing https so I needed to do this:

  1. open cmd as admin
  2. cd C:\Program Files (x86)\IIS Express
  3. IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:portnumber/ -UseSelfSigned

Here is what I did: I went to the project tab -> properties -> Web then clicked the create virtual directory and everything started working back normal.

In my case, it was not the application but what I was submitting. My form contained a file I was uploading and when I hit submit I would get that error. Turns out the file couldn't be uploaded because the file was in use. I just closed the file I was trying to attach and it worked.

For the VS 2019, If you set SSL enabled for your project, there are two URLs create for your project (URL and SSL URL).

To fix this issue Go to project properties => Web: update the Project Url, Create virtual Directory and save.

I had the same problem, I noticed that in certificate manager => personal, the localhost certificate is missing I copied that from certificate manager => TrustedRoot and the problem solved

altho it might be caused by other problems

Try this...

  1. open command prompt Run as Administrator

  2. type ipconfig /flushdns -- Message should appear: "Successfully flushed the DNS Resolver Chache".

  3. after that type netsh winsock reset -- Message should be appear: "Successfully reset the winsock catalog. you must restart the computer in order to complete the reset."

  4. Then restart your machine.

Here's what I did. Right-click on the project and go to properties. Under the Debug tab uncheck and check Enable SSL. It will create a random url with port. Copy and paste the generated URL in the App URL. It worked for me fine there after.

enter image description here

Follow the below steps

  1. Right-click on the project and go to properties
  2. Under the Debug tab uncheck Enable SSL

enter image description here

matendie answer working for me,

  1. open cmd as admin
  2. cd C:\Program Files (x86)\IIS Express
  3. IisExpressAdminCmd.exe setupsslUrl -url:https://localhost:portnumber/ -UseSelfSigned
Related