WCF service problem
My client has given me a WCF service link which I am using in my asp.net code. Two days before every thing was working fine but now suddenly I am getting below error while using wcf service:
The content type text/html; charset=UTF-8 of the response message does not match the con开发者_高级运维tent type of the binding (text/xml; charset=utf-8)........
So is it the problem inside wcf service or in my asp.net code. I can't directly ask client to check your service so I though to first ask on stackoverflow.
Please help me.
Go to .NET Command Prompt and type WCFTESTCLIENT... In the UI type your WCF Service path and see if it adds properly. Also try to test one of the methods if it does. If the service is not loading, you know that the problem is in WCF Service side.
If the service is working fine, then you have to debug your code.. However by looking at your error message, I guess it is the Service side issue...
Every time I've seen this happen, it's because the service now has a 500 error for some reason, so it's throwing you the ASP.NET error page instead of the XML it should be returning. In a browser, go to the service URL and see what happens. If you get a 500 error (the standard ASP.NET "yellow screen"), that's likely your problem. If you don't, that doesn't mean this isn't the problem, though, since the error could manifest only on a particular method call, for example.
Problem could be at either side. Check your uri, request xml through fiddler if you are using http binding.
精彩评论