user616076
user616076

Reputation: 4001

My browser cannot find localhost when running VS2017 project and says 'Cannot reach this page'

I've been making some changes to my MVC project which earlier today was running fine. However, I installed some new software including PostGreSql and npgsql for Visual Studio and now when I run my project it seems IIS can no longer find localhost. The actual message is 'Cannot reach this page. Make sure the web address http://localhost:4068 is correct'.

I've checked that my IIS is running and I've tried deleting my IISExpress folder, deleting the config file in .vs/config but so far nothing seems to work and I don't even know what it was that caused it. If anyone has had this issue, please let me know how you resolved it.

Upvotes: 0

Views: 434

Answers (2)

Hooman Bahreini
Hooman Bahreini

Reputation: 15549

The most likely scenario is that your project's properties have changed.

Have you checked the web settings? (right click on project -> properties)

enter image description here

Upvotes: 1

Markus Rosjat
Markus Rosjat

Reputation: 146

You need to put an entry in your c:\Windows\System32\Drivers\etc\hosts File like

127.0.0.1 localhost

Or simply try http://127.0.0.1:4068 as url

Editing the file needs administrative rights so you might run your editor as administrator.

Upvotes: 0

Related Questions