I have this WCF service hosted on IIS. When I try to consume it in my client project using below code I get following exception "An error occurred while sending the request"
LaunchService.LaunchServiceClient launchServiceClient =
new LaunchService.LaunchServiceClient(
new BasicHttpBinding(),
new EndpointAddress("http:// Service base address"));
If I change BasicHttpBinding()
to WebHttpBinding()
in above code(as in my web.config file) I get this error
"System.TypeLoadException: 'Could not load type 'System.ServiceModel.WebHttpBinding' from assembly 'System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.'"
When using default constructor, I get this error
"System.PlatformNotSupportedException: 'Configuration files are not supported. "
LaunchService.LaunchServiceClient launchService = new LaunchService.LaunchServiceClient();
I tried changing setting in web config file, but any changes in it wont make the service work.
Any help?
Thanks in advance..