5

I am using the loopback 10.0.2.2 and connecting to the port its running on but it always returns "HTTP Error 400 - The request hostname is invalid"

So does anyone know how to connect to IIS express in the Android emulator?

LazyOne
  • 158,824
  • 45
  • 388
  • 391
Azzy
  • 51
  • 3
  • I have this issue with ApiController, I made it work using Controller instead and return JsonResult – Kunukn Aug 27 '13 at 15:12
  • Possible duplicate: [Android Emulator loopback to IIS Express does not work, but does work with Cassini](http://stackoverflow.com/q/6192726/145173) – Edward Brey Sep 23 '13 at 11:11
  • You can follow https://blog.lextudio.com/how-to-let-android-emulator-access-iis-express-f6530a02b1d3 – Lex Li Jul 15 '17 at 04:02
  • Possible duplicate of [IIS Express access from Android emulator](https://stackoverflow.com/questions/43622782/iis-express-access-from-android-emulator) – Lex Li Apr 13 '18 at 22:59

1 Answers1

1

I just ran into this using IIS Express. For now, to get around this problem, I switched over to use the Visual Studio Development Server (Cassini).

You will also need to check the versions of jquery and jquery mobile, to verify that they are compatible. I was running with jquery-ui-1.8.11, which I downloaded, but used jquery-1.5.1 which came with the ASP.NET MVC 3 app template. When I replaced the jquery 1.5.1 with jquery 1.7.2, it started working.

According to: http://jquerymobile.com/blog/2012/04/13/announcing-jquery-mobile-1-1-0/ jquery mobile 1.1.0 final requires jQuery core 1.6.4 or 1.7.1

GKlesczewski
  • 192
  • 4
  • I am running into the same issue. I am looking for a solution too – Kunal Aug 03 '12 at 00:50
  • Double check the versions of the javascript tools you are using - the jquery libraries need to match. jquery is picky about this sort of thing. – GKlesczewski Aug 03 '12 at 20:56
  • Thank you!!! Switching over to development server in VS fixed the issue. I have been messing around with this problem for hours. – Dante Apr 24 '13 at 23:35
  • The Visual Studio Development Server also worked for me. Thanks for the solution. – Neil Monroe Feb 13 '14 at 18:50