请求失败,HTTP状态为415 [英] The request failed with HTTP status 415

查看:459
本文介绍了请求失败,HTTP状态为415的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试从WCF调用方法时出现异常...我正在使用Framework 2.0在Windows应用程序中使用WCF,而我的WCF使用BasicHttpBinding选项...

I am getting an exception when I try to call method from WCF...I am consuming WCF in windows application using framework 2.0 and my WCF uses the BasicHttpBinding option...


请求失败,HTTP状态为
415:由于内容类型为'text / xml,因此无法处理消息

charset = utf-8不是预期的
类型多部分/相关;
type = application / xop + xml'

The request failed with HTTP status 415: Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'multipart/related; type="application/xop+xml"'


推荐答案

客户端应用程序失败,因为它在需要MTOM消息的端点上发送数据。但是,客户端应用程序仅发送纯Soap消息(Soap1.1)。如果无法升级客户端应用程序以使用.Net Framework 3.5,则可以使用WSE 3.0,该WSE 3.0允许将MTOM与.net Framework 2.0一起使用。

The client application is failing as it sends data on an Endpoint which is expecting MTOM messages. However, the client application just sends plain Soap messages (Soap1.1). If you can't upgrade your client application to use .Net Framework 3.5, you can use WSE 3.0 which allows to use MTOM with .net framework 2.0.

将应用程序升级到3.5,您可以使用WCF与服务进行通信。

If you can upgrade application to 3.5, you can use WCF to communicate to service.

关于,
阿米特·巴蒂亚

Regards, Amit Bhatia

这篇关于请求失败,HTTP状态为415的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆