Reputation: 295
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?
Upvotes: 18
Views: 43888
Reputation: 31
matendie answer working for me,
Upvotes: 2
Reputation: 53
Follow the below steps
Upvotes: 0
Reputation: 763
In my case IIS Express is not allowing https so I needed to do this:
Upvotes: 27
Reputation: 634
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.
Upvotes: 0
Reputation: 151
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
Upvotes: 1
Reputation: 1
Try this...
open command prompt Run as Administrator
type ipconfig /flushdns
--
Message should appear: "Successfully flushed the DNS Resolver Chache".
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."
Then restart your machine.
Upvotes: 0
Reputation: 945
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.
Upvotes: 1
Reputation: 87
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.
Upvotes: 2
Reputation: 106
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.
Upvotes: 9
Reputation: 548
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
Upvotes: 4