Specify default WCF endpoint in app.config
Posted
by Nelson
on Stack Overflow
See other posts from Stack Overflow
or by Nelson
Published on 2010-04-12T21:01:05Z
Indexed on
2010/04/12
21:03 UTC
Read the original article
Hit count: 336
wcf-binding
|endpoint
When you add a service reference it creates the class "MyServiceClient" with a default constructor. If I use new MyServiceClient() I get an error: Could not find default endpoint... If I use new MyServiceClient("endpointName") it works.
I would like to specify a default endpoint in app/web.config which will get used when I use the default constructor. I know I can place that default name in *.settings which ends up in app.config, but just wondering if there is any built-in way to do it.
© Stack Overflow or respective owner