Call an ASMX or WCF service from another WCF service

I have a Windows Service (WCF Service with Windows Authentication and netTCPBinding) that is being used by a WPF Application. Now I have a requirement to call another service hosted on a separate machine (it could be an ASMX or WCF service) from my Windows service.

I'd like to know

a) Is it correct for you to call one web service by another, or should I call it from my WPF application.

b) If I need to call this service from my windows service, that's all I need to consider and any errors I need to be aware of, such as authentication, bindings.

Any links showing similar implementations would be helpful

thank

+3


source to share


1 answer


a) There is no reason you shouldn't, but make sure you terminate any errors that might happen in your other service, dot let errors from your service downstream to your call application (WPF).

b) Nothing that you would not encounter in the Calling app, like timeouts. Make sure your service timeout is serving service timeouts for subsequent service.



Also, if I can give some advice from experience, try to stick with the ChannelFactory pattern http://msdn.microsoft.com/en-us/library/ms734681(v=vs.110).aspx .

+1


source







All Articles