Search code examples
visual-studio-2010mobilelocalhostiis-expressandroid-browser

Enable Android device to access IIS Express whilst on same network


I am looking for a way to easily test the mobile version of my site in development.

I have set up IIS Express, such that I can access locally using:

http://localhost:1025/AppName/

or by using my PC name (dazbradbury-pc)

http://dazbradbury-pc/AppName/

This then works from any machine on my network.

However, when I try to use this address from an android device, it simply doesn't work. Has anyone got this working? If so, what further steps were required?


Solution

  • Thanks to @SLaks for the information:

    That's probably because Android doesn't do WINS name resolution. Try the IP address.

    Hence, I updated my IIS Express to point to an IP address by inserting into the bindings in applicationhost.config an IP address:

    <binding protocol="http" bindingInformation="*:80:192.168.1.97" />
    

    where 192.168.1.97 is the local IP address of my machine.

    I can now access my machines IIS Express instance from my android device.