InvalidOperationException when using soap client

Posted by codymanix on Stack Overflow See other posts from Stack Overflow or by codymanix
Published on 2010-03-23T09:53:33Z Indexed on 2010/03/23 10:13 UTC
Read the original article Hit count: 279

Filed under:
|
|
|
|

I've added as wsdl file using the add servece reference dialog in vs2008.

MyService serviceproxy = new MyService();

When I instantiate the service proxy, I get an InvalidOperationException with the following text (translated from german):

Could not find default endpoint element to the contract "ServiceName.ServiceInterface" in the service model refers client configuration section. This may be because: The application configuration file was not found or not an endpoint in the client element item is found, which corresponded to this contract.

Where servicename is the name I give the service when I add it in vs2008 and ServiceInterface the interface which is automatically generated for it.

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET