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?
In my case IIS Express is not allowing https so I needed to do this:
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
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.
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With