2
votes

I modified the default application host file to enable remote connection to my IISExpress. As I learned here, I modified the bindings as follows:

<sites>
  <site name="Development Web Site" id="1" serverAutoStart="true">
    <application path="/">
      <virtualDirectory path="/" physicalPath="%IIS_BIN%\AppServer\empty_wwwroot" />
    </application>
    <bindings>
      <binding protocol="http" bindingInformation="*:80:*" />
    </bindings>
  </site>
<sites>

When starting the service, I get this:

C:\Program Files\IIS Express>iisexpress /path:c:\iis\ /port:80

Copied template config file 'C:\Program Files\IIS Express\AppServer\applicationhost.config' to 'C:\DOCUME~1\test\LOCALS~1\Temp\iisexpress\applicationhost201311513534137.config'

Updated configuration file 'C:\DOCUME~1\test\LOCALS~1\Temp\iisexpress\applicationhost201311513534137.config' with given cmd line info.

Starting IIS Express ...

Successfully registered URL "http://localhost:80/" for site "Development Web Site" application "/"

Registration completed IIS Express is running. Enter 'Q' to stop IIS Express

And in the actual config file I have this:

<site name="Development Web Site" id="1" serverAutoStart="true">
  <application path="/">
    <virtualDirectory path="/" physicalPath="c:\iis\" />
  </application>
  <bindings>
    <binding protocol="http" bindingInformation=":80:localhost" />
  </bindings>
</site>

As the server is bound to localhost, I can't access it remotely.

How can I force the setting to take effect?

1

1 Answers

0
votes

Solution: use the /config switch and assign a specific config file so it won't copy the default file and doesn't modify it uncontrollably.