Khizar
Khizar

Reputation: 329

Using WCF services remotely

I have created a simple WCF service by following a MSDN tutorial. I successfully created service and client. But I have a very basic question, that how can I use this service remotely. Foe example my service is hosted on a web server then how can I access and consume it from my PC. I know how to do this with web services but don't know with WCF service as Iam new to WCF. Any tutorial or code sample is appreciated.

Thanks

Upvotes: 0

Views: 4092

Answers (2)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038810

Once you deploy the WCF service on some remote server all you have to do is to modify the endpoint address of the client to point to this remote address. This will depend on where you have configured the client endpoint. Usually it is done in the app.config/web.config:

<endpoint address="http://someremotedomain/myservice.svc" ...

Upvotes: 1

Muhammad Hasan Khan
Muhammad Hasan Khan

Reputation: 35126

In your sample you must have specified the address of the service as endpoint. You just need to modify the address in your app/web.config file and it will start talking to remote service.

See Specifying an Endpoint Address

Upvotes: 1

Related Questions