Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting ERR_CONNECTION_REFUSED when running .NET API on localhost from Visual Studio

I'm a newbie in .NET coding, I'm trying to run a project using .NET using IIS Express on Google chrome, I get this error : ERR_CONNECTION_REFUSED

enter image description here

Here is what I've tried so far, and it does not work:

  • Changing the port number under properties section, and creating a new virtual directory enter image description here

  • Removing the applicationhost.config from the .vs project folder

  • Disabling the proxy

  • Running Visual Studio as an Administrator

  • Disabling the Script Debugging

like image 482
Angelika Avatar asked Jan 24 '26 11:01

Angelika


2 Answers

In my case, this issue was resolved by removing the .vs file followed by restarting Visual Studio as an Administrator

like image 185
Angelika Avatar answered Jan 27 '26 06:01

Angelika


While creating the database connection try to use port number with localhost it worked for me so might go same with you as well.... Good luck.

like image 32
rutik thakkar Avatar answered Jan 27 '26 05:01

rutik thakkar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!