Quantcast
Channel: Visual Studio and Visual Web Developer Express
Viewing all articles
Browse latest Browse all 3509

IISExpress Custom Domains

$
0
0

I've been (successfully) running a couple of ASP.NET (.NET Framework 4.6.2, WebForms) websites through Visual Studio 2017 / IISExpress using custom domains. I installed Visual Studio 2019 (Community) the other day, and all of a sudden the custom domains have stopped working on all projects in both Visual Studio 2017 and 2019! The system-tray for IIS Express still continues to show that the binding is accepted:

enter image description here

However, when attempting to browse to that URL, Chrome gives me a "ERR_CONNECTION_REFUSED" error:

enter image description here

Just to be clear, the steps are taken on each project are as follows:

  1. Modify the applicationhost.config file in the web project's .vs folder to include:

<binding protocol="http" bindingInformation="*:80:agentdesktop.local" />

  1. In an elevated command prompt, execute:

netsh http add urlacl url=http://agentdesktop.local:80/ user=everyone

  1. Add to the hosts file:

127.0.0.1 agentdesktop.local

I've deleted the .vs directory, removed the urlacl entry, removed the IISExpress directory in the Documents folder. Performed all actions outlined above as had been done previously, and still I cannot get it to accept the connection!

If I ping agentdesktop.local then I get a valid response from 127.0.0.1, and the fact it's appearing in the IIS Express system tray, makes me think that something in between is intercepting and blocking. I've installed Fiddler and watched an attempted connection on the custom domain, and the response is:

System.Net.Sockets.SocketException No connection could be made because the target machine actively refused it 127.0.0.1:80

Does anybody else have any ideas as to how I could get this back working again, or what might have gone wrong!?


Viewing all articles
Browse latest Browse all 3509

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>