IIS Express Run From a Remote Machine
Sometimes running a web application using IIS Express using localhost is fine, but if you want to use the IP address and port to access it from another machine then you need to configure IIS Express. For example if you see this error
You can get to the IIS Express settings applicationhost.config by going to IISExpress\config in your documents folder.
The important section of the config file are the sites listings
To access it from another machine, you need to add an extra entry for the binding like this:-
But after restarting IIS Express which is accessible from the try icon you may get this
Usually all you need to do is start a command console as administrator and run this command:-
To delete the same urlacl run this:-
But sometimes that does not always work and you still cannot run the web application by its IP address. The other approach is to run Visual Studio as administrator. This can be tedious every time you start Visual Studio up, so find its executable which is usually under:-
Right click the devenv.exe icon and choose properties. The select the compatibility tab.
Change the Privilege Level to run as administrator like this:-
You can also choose to change this setting for all users if you wish.
Now you should be able to run your web application from another machine such as virtual machine.