I have a self-hosted service which I am calling through it’s proxy in a client app.
When the service has multiple endpoints, svcutil adds “ConfigurationName” properties to the endpoints in the config file. With a single endpoint, that parameter is not necessary.
When instantiating the service via the proxy, I was following a single endpoint example and forgot to indicate *which* endpoint or configuration I wanted. Thus my code:
ServiceProxy myproxy=new ServiceProxy();
gave me an error when it hit the proxy’s constructor and I was given the following exception:
could not find endpoint element that references contractType [whatever my contract name is]
Oddly, if I found that if I removed ConfigurationNames from the config, the app will actually run and somehow randomly selected from the multiple endpoints.
The exception message led me on a very wild goosechase. But luckily, Softwaremaker, who is quite the Indigo guru already, asked me a key question: “how are you instatiating the proxy?”
Since all of this stuff is so new, I am placing this mistake out on Google for the next person who makes this mistake.
Don’t Forget: www.acehaid.org
Sign up for my newsletter so you don't miss my conference & Pluralsight course announcements!