2012-06-20 107 views
1

我想从我的ASP.net MVC 3项目消耗了PHP的Web服务,我添加了一个服务引用,建行,但使用它时出现错误:ASP.net MVC - 消费PHP Web服务

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

它必须做一些内容类型格式绑定我猜,我该怎么做?

感谢

回答

0

我相信这个问题已经回答了,我相信同样的概念也适用于任何类型的Web服务:WCF Exception: Text Message Encoding and ISO-8859-1 Encoding

+0

嗨,我一直在寻找这篇文章,我不太了解WCF,我已经看过有关建议的解决方案,在我看来,Webconfig与Asp.net MVC 3和WCF解决方案不完全相同。我最终做的是将WebService导入为“添加Web引用”而不是“添加服务引用”,VS自动执行该作业,现在工作正常 – dtjmsy

1

解决方案 - >导入WebService的为“添加Web引用”,而不是'添加服务参考',VS会自动完成这项工作。