Bad request or Service Unavailable on IIS express when trying to reach web api 2 from android

时间:2017-06-15 09:46:10

标签: android asp.net-web-api2 iis-express

I am trying to reach my rest service on my local IIS express machine with my android application on emulator but I get either a Bad request or Service Unavailable response.

At first I had bad request problem that was latter replaced with service unavailable problem. This is what I have done so far:

In applicationhost.config I added this

 <binding protocol="http" bindingInformation="*:49496:*" />

Then thorough Command prompt i did this:

netsh http add urlacl url=http://*:49496/ user=everyone

netsh advfirewall firewall add rule name="IISExpressWeb" dir=in protocol=tcp localport=49496 profile=private remoteip=localsubnet action=allow

But even after all that I still get Service Unavailable response

0 个答案:

没有答案