user1800356
user1800356

Reputation: 305

400 bad request accessing ASP.NET mvc 4 application from android

I have a phonegapp App running on an Android emulator and I would like to access my ASP.NET MVC 4 server in order to make a log in request.

The problem is that my Emulator can't access my IIS application. I tried this :

  1. Use 10.0.2.2:port to refer my web site from the android navigator.
  2. Use my local ip address (192.168.0.1:port)
  3. Disabled my Firewall
  4. Change bindings in my configuration file in IISExpress

Despite of that, i've got a "400 bad request error invalid username"...

Can anyone help me ?

Upvotes: 1

Views: 1125

Answers (1)

Waleed Mohamed
Waleed Mohamed

Reputation: 233

I had the same problem. the port number in url isn't recognized by android emulator. so wehn I open visual studio project settings, I changed the IIS settings to have a virtual directory under the local host (for example "localhost/testPorject") instead of "localhost:PortNumer". this worked and the emulator recognized it.

Upvotes: 1

Related Questions