I’ve made a WCF service. I want it’s client to be able to access it from anywhere. How can I do that?
Details:
- I want it to be hosted in a Windows
process, not a site. - I’m using TCP binding.
- I don’t know almost anything about web hosting etc.
- It’s desirable not to use IIS…
I have found many recommendations in the web, but still do not understand all the stuff. Please, tell me how to do it in details…
As I understand, it’s necessary to make a global for the endpoint. I’ve configured port forwarding in my router to the 8000 port, but .. what’s further? What address should I enter as the endpoint address? It’s now localhost:8000.
You will need a public IP address or domain name like suggested above. Find out if you already have it, if not follow the suggestions above on setting that up.
For your WCF host and client, you will need endpoint that look like this:
You will need to make sure that your router route the port to the host PC. From the question sounds like you have done it correctly. Because the host is local, you dont have to change the endpoint to use public ip or domain name. The client needs to resolve the call to the host which resides on the remote address, hence need the addressable public IP.