1

I am trying to consume a PHP web service from my ASP.net MVC 3 project, I add a service reference, build ok, but when using it error:

The content type text/xml; charset=ISO-8859-1 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly

It has to do something with the content type format binding I guess, How would I do it ?

Thanks

dtjmsy
  • 2,664
  • 9
  • 42
  • 62

2 Answers2

1

Solution -> Import the WebService as 'Add Web Reference' instead of 'Add Service Reference', VS does automatically the job.

dtjmsy
  • 2,664
  • 9
  • 42
  • 62
0

I believe this question has already been answered, I believe the same concept applies to any type of web service: WCF Exception: Text Message Encoding and ISO-8859-1 Encoding

Community
  • 1
  • 1
  • Hi, I have been looking about this post, I don' t know much about WCF, I have looked about the proposed solution, seems to me that the Webconfig is not exactly same from Asp.net MVC 3 and WCF solution. What I ends up doing is to import the WebService as 'Add Web Reference' instead of 'Add Service Reference', VS does automatically the job, works fine now – dtjmsy Jun 21 '12 at 08:25