Enable Android device to access IIS Express whilst on same network
Asked Answered
Y

1

11

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?

Yusem answered 23/1, 2012 at 18:26 Comment(2)
That's probably because Android doesn't do WINS name resolution. Try the IP address.Edger
Thanks @SLaks, that was the clue I needed! I've posted an answer for now, but you deserve the credit. Thanks again!Yusem
Y
10

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.

Yusem answered 24/1, 2012 at 13:19 Comment(3)
Thanks. I had the same problem and almost had the solution... except I was trying to bind with my public IP address so it didn't work.Festival
If you get Access Denied, Run Visual Studio as Admin.Runner
@nVentimiglia, thank you so much for suggesting running as admin. Totally solved my problem!Sherwood

© 2022 - 2024 — McMap. All rights reserved.