Tuesday, August 30, 2011

could not be loaded because more than one endpoint configuration for that contract was found

While consuming the wcf service I got the following error
System.InvalidOperationException: An endpoint configuration section for contract '
' could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name.

To resolve this pass the end point name in the constructor while creating object as follows

ServiceReference1.Service1Client serviceClient = new ServiceReference1.Service1Client("NetTcpEndPoint");
Here NetTcpEndPoint in the end point name.
You can also check some WCF articles here.

No comments:

Post a Comment