开发者

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 an开发者_开发百科d 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


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


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" ...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜