Is it possible to set ClientCredentials without using a generated proxy? I have seen something about using a ChannelFactory, but is it possible to do it without this as well?
Is it possible to set ClientCredentials without using a generated proxy? I have seen
Share
In order to call a WCF service from a client, you need a proxy (unless you want to hardcode the SOAP request yourself, which isn’t something too easy to do, especially if you’re dealing with security). The proxy can be created either using one of the tools to generate the proxy (Add Service Reference, svcutil, etc), or by using
ChannelFactory<T>. If you’re using a generated proxy, you’d use the ClientCredentials property of the proxy (inherited from the base classClientBase<T>. If you use theChannelFactory<T>, you’d set them in theCredentialsproperty of the channel factory.