Now let’s see how IIS Express log file tells the truth of the incoming requests. We can see that indeed now requests to are being served by IIS Express. And then when a non-administrator user launches the worker process for this web site, requests to port 61902 would be well served. OK, all existing reserved URLs are displayed in the list, and you can use Add/Remove buttons to manipulate the list.īy adding a new reservation of all necessary permissions are granted to everyone on this machine (the meaning behind D:(A GX WD)). On a server node, you can now open a brand new HTTP API page, Figure 7: Reserved URLs in Jexus Manager. Figure 6: Open HTTP API page in Jexus Manager.
An administrator can create a reservation and grant certain users permissions to use it. Microsoft of course has a solution for this, which is called URL reservation. The result is that you see the site has started, but incoming requests won’t work. But when Jexus Manager is not run as administrator, the IIS Express worker process it launches for this web site would lack the permissions to activate the site binding. The same applies to running Jexus Manager as administrator and starting the web site from it. Why?įull IIS runs as a service, so when it attempts to activate a site binding, all permissions are met. Sadly you will see the issue remains (unless you run Jexus Manager as administrator and then start the web site from it). What happens if you happen to decide to leave the field blank? Figure 5: Blank host name.
#Xamarin for visual studio express android#
It seems that the Android magic sets Host header to 127.0.0.1 so that IIS Express can process the requests in this way. If you decide to change from “localhost” to 127.0.0.1, congratulation that you found the simplest fix. Simplest Fix Figure 4: 127.0.0.1 as host name. You can try it out in Jexus Manager, Figure 3: Site binding before editing. You might wonder if we can get rid of the error by modifying IIS Express configuration file. Figure 2: Default site bindings on IIS Express. The request from Android does not have “localhost” as Host header (guess what’s value then?), so it would be dropped, and a 400 error page is returned. The reason behind is pretty obvious, that IIS Express only checks incoming requests at port 61902, whose HTTP Host header matches “localhost”.
The request hostname is invalid.”) Figure 1: Android emulator 400 error page. However, this magic won’t work for IIS Express by default, if your site has only an HTTP binding like *: 61902:localhost”`, and you might see an error like this, (“Bad Request - Invalid Hostname”, “HTTP Error 400. So the Default Web Site would be able to serve all incoming HTTP requests at port 80 on all network adapters, including requests to (:80) from the Android emulator. One such example is the Default Web Site, whose has one important HTTP binding *:80:*. Such a magic can be quite useful if you host your test web site on IIS and that site monitors all network adapters.
(Later I will give you proof on the magic routing.) If you try to browse to this IP address, the requests would be routed to 127.0.0.1 loopback adapter of the host machine. So Google defines a magic IP address 10.0.2.2. And this blog tries to provide every bits that you might be interested in.įirst tip you should understand is that the Android emulator (a virtual device) has its own networking. I bet this question has been asked a million of times, but hope not every blog posts cover all the hidden details.