I am developing a project in VS2010 and am able to view my site locally via IIS Express. I would like to enable external access over the network.
All my research has sent me to this blog entry: http://blogs.iis.net/vaidyg/archive/2010/07/29/serving-external-traffic-with-webmatrix-beta.aspx, which is helpful but does not seem to show how to configure bindings for a project started in visual studio (I cannot find the screen in the screenshots, and I have edited binding info in applicationhost.config, but it does not seem to be reflected when I run the site from visual studio).
Visual Studio 2013 SP1 and above (2015) includes the setting "Apply server settings to all users (store in project file)". This is enabled by default. When enabled Visual Studio launches IIS Express with command line arguments that make it use a different configuration file. The location of the 'applicationhost.config' file is under the project directory in '.vs\config'.
in the application pool on IIS set "Enable 32-Bit Applications" to "true".
I spent hours on this issue as well, trying to browse from my Android Xoom to my win7 dev machine, so I could test a new asp.net web app I created. All I did was change IISExpress' applicationhost.config from using the PC HostName to the PC's current IP address, for my new site.
to
Once I did this & re-started IISExpress... I was able to browse to my dev-Lee machine & see my app from my Xoom!
I had a lot of trouble getting this to work from visual studio 2012, I went from 404 errors to 503 errors. Eventually what worked for me, was to wipe out all the related configuration in the IIS Express config...
Then I created a new virtual directory from the properties page in my web project in VS but before I created the virtual directory I changed the hostname to http://myhost:80/ then hit the create virtual directory button. Previously I had been getting errors saying the hostname must be 'localhost' but this time it did not. And after that, it worked.
In short, clear out the existing config first and start again.
If you external domain is "name.mydyndns.com", then you need to write:
This works on Windows 2003 Server and IIS 7.5 Express.
1 After editing applicationhost.config file (located in the IISExpress folder in your documents), your site bindings should look like below:
Bindings consist of three parts. Firstly an IP address or list, or as in this case, a wildcard. Secondly the port number, and thirdly a hostname, or list, or wildcard (for filtering by
Host
header). For development purposes, a wildcard is most suitable here as you will likely be using a unique port.2 Because you are using non-localhost binding, additional permissions are required. You could run VS as administrator, or preferably you should add URL ACLs to grant the required permissions. In the example below permission is given to everyone, but you could use your own username.
Note: The
urlacl
must exactly match the binding. So aurlacl
forhttp://*:8080
will allow a binding of*:8080:*
, but not a binding of*:8080:localhost
even though the latter is a subset of the former. this means if, instead of using a wildcard, you list host headers inapplicationhost.config
, you must add a matchingurlacl
for each.Note 2 If running VS as administrator or adding ACL entries doesn't solve your problem, then run IIS Express from the command line and check if there are any binding registration failure messages. To start from the command line, give this command:
3 Finally you will need appropriate firewall entries. For this it is easiest to use the "Windows Firewall with Advanced Security" console.
Under "Inbound Rules" choose "New Rule...".
40000-65534
which covers the entire range used by Visual Studio, but be aware this is less secure).