I am trying to cnsume a WCF service.I was given the URL to the svc file. 1. Created a Windows form application 2. Added a service reference to the svc file 3. In my code behind during form load event, i call the method exposed by service
ServiceReference1.SearchServiceClient search = new WindowsFormsApplication1.ServiceReference1.SearchServiceClient();
var serviceResult = search.SearchByClientNumber("1");
I get this error The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute or from the configuration behavior) on the server in order to send the exception information back to the client, or turn on tracing as per the Microsoft .NET Framework 3.0 SDK documentation and inspect the server trace logs."
I can invoke the method using WCFTestClient but not in my application.
Is there some change that i need to perform in my test app config file? There is a section for
<client>
<endpoint address="http://somewhere.com/Service.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ISearchService"
contract="ServiceReference1.ISearchService" name="BasicHttpBinding_ISearchService" />
</client>