I have a service which has one endpoint , I have defined this endpoint in app.config file.
I want to know how can I create endpoints if I have app.config in program.
Please give me an idea.
I have a service which has one endpoint , I have defined this endpoint
Share
Do you have a generated proxy for your service? If so, just use the proxy client!
Optionally, you can pass in a name for the configuration to use:
No need to do anything fancy.
If you haven’t created a proxy (using “Add Service Reference” in Visual Studio or svcutil.exe on the command line), you’ll need to add a reference to your assembly containing the service and data contracts, and then use
Again, for creating the channel factory, you can pass in a name of a configuration section, if you have multiple, to specify which one to use.
Also, to clarify – a client can only ever have one endpoint at any given time. The service might have multiple – but the client needs to make up its mind and connect to exactly one of those – you cannot have multiple endpoints in a client (as the title of your questions appears to imply).
Marc