I'm trying to connect an application (the client) to an exposed WCF service, but not through the application configuration file, but in code.
How should I go about doing this?
I'm trying to connect an application (the client) to an exposed WCF service, but not through the application configuration file, but in code.
How should I go about doing this?
You'll have to use the ChannelFactory class.
Here's an example:
Related resources:
You can also do what the "Service Reference" generated code does
Where IServiceX is your WCF Service Contract
Then your client code: