Access IIS Express Website From Remote Machine

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

Invalid hostname

Invalid hostname

You can get to the IIS Express settings applicationhost.config by going to IISExpressconfig 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

 

Visual Studio error

Visual Studio error

 

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:-

Visual Studio .exe properties

Visual Studio .exe properties

 

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.

 

Happy coding

 

 

Posted in CodeProject, MVC, Practices, Web
0 comments on “Access IIS Express Website From Remote Machine
1 Pings/Trackbacks for "Access IIS Express Website From Remote Machine"
  1. […] Access IIS Express Website From Remote Machine – Garry Pilkington takes a look at running applications in IIS Express and making them available over the network rather than just on the local machine. […]

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>