BasicHttpBinding with WCF client
-
Dearc All, i have a set of WCF services self-hosted. I have a WCF client too that access all these service. When i use WSHttpBinding then vs2003 applications are not able to acess these services, so changed the binding to BasicHttpBinding. now the WCF client fails to access the services. WSHttpBinding is not working with previous version client BasicHttpBinding is not working with the WCF client WSHttpBinding
_WCFSampleServiceHost.AddServiceEndpoint(typeof(ISampleService1), new WSHttpBinding(), "SampleService1");_ ServiceMetadataBehavior WCFsmb = new ServiceMetadataBehavior(); WCFsmb.HttpGetEnabled = true; WCFSampleServiceHost.Description.Behaviors.Add(WCFsmb);
BasicHttpBinding_WCFSampleServiceHost.AddServiceEndpoint(typeof(ISampleService1), new BasicHttpBinding(),"SampleService1");_ ServiceMetadataBehavior WCFsmb = new ServiceMetadataBehavior(); WCFsmb.HttpGetEnabled = true; WCFSampleServiceHost.Description.Behaviors.Add(WCFsmb);
Given below the error messageContent Type application/soap+xml; charset=utf-8 was not supported by service http://dev678/WCFSampleService1/SampleService1. The client and service bindings may be mismatched. ---> System.Net.WebException: The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..
Can any body help me With thanks and regards,Ramesh.Kanjinghat
-
Dearc All, i have a set of WCF services self-hosted. I have a WCF client too that access all these service. When i use WSHttpBinding then vs2003 applications are not able to acess these services, so changed the binding to BasicHttpBinding. now the WCF client fails to access the services. WSHttpBinding is not working with previous version client BasicHttpBinding is not working with the WCF client WSHttpBinding
_WCFSampleServiceHost.AddServiceEndpoint(typeof(ISampleService1), new WSHttpBinding(), "SampleService1");_ ServiceMetadataBehavior WCFsmb = new ServiceMetadataBehavior(); WCFsmb.HttpGetEnabled = true; WCFSampleServiceHost.Description.Behaviors.Add(WCFsmb);
BasicHttpBinding_WCFSampleServiceHost.AddServiceEndpoint(typeof(ISampleService1), new BasicHttpBinding(),"SampleService1");_ ServiceMetadataBehavior WCFsmb = new ServiceMetadataBehavior(); WCFsmb.HttpGetEnabled = true; WCFSampleServiceHost.Description.Behaviors.Add(WCFsmb);
Given below the error messageContent Type application/soap+xml; charset=utf-8 was not supported by service http://dev678/WCFSampleService1/SampleService1. The client and service bindings may be mismatched. ---> System.Net.WebException: The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..
Can any body help me With thanks and regards,Ramesh.Kanjinghat
do you have a config file? if yes, could you post its content?
-
do you have a config file? if yes, could you post its content?
I located what the actual problem is. i am configured basicHttpBinding at server side and wsHttpBinding at client side. i have changed the client side binding to basicHttpBinding and it is working fine now. Thanks for your concern Joachim
Ramesh.Kanjinghat