If you developed your site with WebMatrix, and therefore are running IIS 7 Express, follow these instructions:
By default, WebMatrix binds to localhost, so if you try to use your machine name (i.e. allow other machines on the LAN) to view your site, it won’t work. The reason for this is that IIS Express (the WebMatrix web server) is designed to be run without administration rights. It’s not meant for production environments - it’s meant for simple development environments.
In order to do testing on another computer, you need to therefore make a few minor changes. Firstly, you need to be running WebMatrix as an administrator. To make the change so that WebMatrix runs as an admin by default:
- Close all instances of WebMatrix
- Find the WebMatrix executable (typically in C:\Program Files (x86)\Microsoft WebMatrix\WebMatrix.exe or C:\Program Files\Microsoft WebMatrix\WebMatrix.exe)
- Right click the executable, click properties, click the ‘Compatibility’ tab, and select ‘run as administrator’.
- Click OK.
- Open %USERPROFILE%\My Documents\IISExpress\config\applicationhost.config in notepad
- ctrl+f ), copy and paste the binding entry so that you have two copies, and change one of the bindings to “”
- Save & close the applicationhost.config
- Add a Windows firewall exception for external access to that port
- Launch webmatrix, and test away :)
If it bothers you, you can optionally turn of “User Account Control” on your system to prevent the admin rights prompt from coming up every time you launch the app. Remember to turn it back on later.