4

I built a WCF service that exposes itself for a web application, it accepts an object and prints the data on the clients machine. Works fine on my development machine, and the service is up and running on any machine i install it on. I can enter ip address in clients machine web browser and see it is running. Problem is when i send the object to the clients machine it returns an error, that sounds like it could be because of the clients windows firewall. Where would i start at to deal with this problem ?

There was no endpoint listening at http://192.168.1.168:2202/PrintLabel that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

And the InnerException: Unable to connect to the remote server

Cœur
  • 37,241
  • 25
  • 195
  • 267
Keith Beard
  • 1,601
  • 4
  • 18
  • 36
  • 1
    Are you able to view `192.168.1.168:2202` with port number from the client's browser? If so, it wouldn't seem like a firewall issue. – mellamokb May 13 '11 at 15:10
  • Ok so on my Windows XP VM it can able to view the port and locate the service, but not on my Win 7 VM – Keith Beard May 13 '11 at 15:44

1 Answers1

1

With further research and discussion with people in the community i came to understand that as was mentioned at the bottom of this article.
"Self-hosted HTTP addressing for WCF is not integrated into the Windows firewall. An exception must be added to the firewall configuration to allow inbound connections using a particular URL.

But this SO question led me to a page with how to control Windows Firewall through code to enable my WCF self hosted service to accept an object. This the link below.
http://www.shafqatahmed.com/2008/01/controlling-win.html

That link was towards the direction i needed, but based on user comments it seemed to have some bugs. A colleague found this link and i believe this technique will be the best solution for this scenario.

Community
  • 1
  • 1
Keith Beard
  • 1,601
  • 4
  • 18
  • 36