3

I am trying to debug a simple web service. I have IIS 7 installed on my development machine (Windows 7), and have installed the web service. I can access it from my development machine, but not from any other machine in the local network.
I opened the firewall to HTTP access, and I can access the default website from other machines, so it is not the firewall.
What security settings should I look at to try to allow devices on the LAN to access the web service?

Aharon Manne
  • 131
  • 4
  • 1
    How are you accessing it from other machines? You're not using `http://localhost` are you? Also, what error / response code are you getting? – squillman Aug 02 '12 at 14:30
  • I'm using the LAN IP address: 192.168.2.102. Again, just entering that address gives me the default IIS 7 web page. Adding 192.168.2.102:8080/api/results (which works on the local machine) gets no response. Wireshark shows that the client is sending a TCP SYN frame, and there is no response. Do I have to open something besides HTTP in the firewall? – Aharon Manne Aug 02 '12 at 14:44
  • Turned off the firewall entirely, and still no joy. – Aharon Manne Aug 02 '12 at 14:46
  • Is your web service running in a different actual web site than the default website? – squillman Aug 02 '12 at 14:50
  • Yes it is. It is a separate web site under IIS – Aharon Manne Aug 02 '12 at 14:52
  • What type of web service? Is it a traditional ASMX,WCF, REST, ...? – Greg Askew Aug 03 '12 at 13:25
  • Sorry @Greg, I didn't see your comment. This is a simple REST service, based on the example in the asp.net site [Web-API](http://www.asp.net/web-api/overview/creating-web-apis/creating-a-web-api-that-supports-crud-operations). – Aharon Manne Aug 16 '12 at 06:51
  • @AharonManne: ok, I wanted to clarify as WCF has a lot of information that may be in the web.config, and a truckload of xml files. I would make sure that when you are testing the web service, you are in fact using IIS, and not the Cassini web server that is part of Visual Studio. Cassini definitely cannot accept connections from other hosts. – Greg Askew Aug 16 '12 at 13:48
  • Thanks Greg. As I noted, the default website is available from other machines, and VS was not running when I tested the service. – Aharon Manne Aug 20 '12 at 06:02

3 Answers3

1

Check the bindings on the web site your web service is running under and make sure it has a binding for 192.168.2.102 on port 8080. Also, make sure your default web site does not have a binding for 192.168.2.102 on port 8080. In all of that, make sure you don't have any wildcard bindings on the default web site that would match 192.168.2.102 on port 8080.

squillman
  • 37,883
  • 12
  • 92
  • 146
0

This isn't an answer yet, but I couldn't figure out how to add screenshots to a comment. Default website bindings (works).
Default
Web service binding (works only locally):

Aharon Manne
  • 131
  • 4
  • I was pretty sure that the issue was permissions, so I did a point by point comparison of the default website permissions with my web service. That led me to add IIS_IUSRS to the list of users, but still no joy. @squillman, if you have any more ideas, I'd be glad to hear about them. – Aharon Manne Aug 07 '12 at 10:46
  • Further, comparison if ASP.NET authorization and IIS authentication did not yield any differences between the site that responds, and the site that doesn't. I still think it's a security issue. – Aharon Manne Aug 07 '12 at 10:53
  • Both the default website and the webservice use an application pool that I defined. The application pool defines the Identity as NetworkService. The default site does not inclue permissions for Network Service, but my webservice does. Nonetheless, it is possible to access the default site, but not my webservice. – Aharon Manne Aug 13 '12 at 10:31
  • You are supposed to edit your original question with new information, not post an answer. – icelava Nov 06 '14 at 09:46
0

In the end, it was the firewall. In other words, turning off the firewall makes the service available. For my test purposes, that is good enough.

Aharon Manne
  • 131
  • 4