How to make ASP.NET Web API web-service available in local network

android, asp.net, iis, visual-studio, web-services

Solution

IIS Express by default does not allow "remote" connections... this post shows you what to do:

IIS Express enable external request

Once you do that, you should be able to connect from ANY other computer in your network.

Also, make sure to open the port in your Firewall.

If that does not work, I would create a site using your local IIS and testing your service that way.

Hope it helps, Daniel.

Problem

I'm about to write a JSON-web-service (VS Express 2012 - ASP.NET WEB API), and now I want to test it by trying to get the data from my Android-app. So i tried to make my service available for the local network by doing this : -> changed from `localhost` to `192.168.1.52` in `applicationhost.config` ``` <site name="MyFirstWebApi" id="5"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="c:\projects\MyFirstWebApi" /> </application> <bindings> <binding protocol="http" bindingInformation="*:61802:192.168.1.52" /> </bindings> </site> ``` -> and also changed Project-properties -> Web -> "Use local IIS-Webserver" -> project-url to `http://192.168.1.52:61802/` But when I'm now trying to start the service, it gives me an error-messagebox: The IIS-Express-webserver could not be started (Translated from german) unfortunatly I can't see what's the exact error, because the VS-output is empty Anyone know's how to fix that or how to set this up correct?

Original source

Related problems