Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

This site can't be reached error

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?

like image 799
сергей тамбовцев Avatar asked Jul 04 '17 03:07

сергей тамбовцев


6 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
like image 55
matendie Avatar answered Nov 19 '22 16:11

matendie


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

like image 27
Hadi Bazmi Avatar answered Oct 12 '22 06:10

Hadi Bazmi


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.

like image 8
Jamaurice Holt Avatar answered Nov 19 '22 17:11

Jamaurice Holt


Try this and it should work:

1-Go to your project folder and open .vs folder (keep your check hidden item-box checked as this folder may be hidden sometimes)

2- in .vs folder - open config

3- see that applicationhost config file there? Delete that thing.(Do not worry it will regenerate automatically once you recompile the project.)

link: localhost refused to connect Error in visual studio

like image 3
Hamed Javaheri Avatar answered Nov 19 '22 16:11

Hamed Javaheri


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.

like image 2
Asheq Reza Avatar answered Nov 19 '22 16:11

Asheq Reza


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.

like image 1
Anoj Avatar answered Nov 19 '22 16:11

Anoj