MaxProtocolVersion错误 - 适用于Microsoft的SAP Gateway [英] MaxProtocolVersion error - SAP Gateway for Microsoft

查看:89
本文介绍了MaxProtocolVersion错误 - 适用于Microsoft的SAP Gateway的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


执行以下代码后,我收到以下错误。 serviceContext将MaxProtocolVersion作为只读返回。如何修改MaxProtocolVersion并解决此问题。

 ServiceDetails serviceDetail = ConfigurationReaderHandler.Instance.GetServiceDetails(" ZPURCHASE_ORDER_SRV" ); 
serviceContext = new ZPURCHASE_ORDER_SRV(new Uri(serviceDetail.Url));
serviceContext.AddAndUpdateResponsePreference = DataServiceResponsePreference.IncludeContent; // error
// data fill - poItem
serviceContext.AddObject(" ZPURCHASE_ORDER_SRV",poItem);
DataServiceResponse response = serviceContext.SaveChanges();


错误:

请求需要使用该版本的3.0协议,但数据服务上下文的MaxProtocolVersion设置为2.0。将MaxProtocolVersion设置为更高版本,然后重试该操作。

解决方案

您好Anandhan,


您需要添加名为 Microsoft的程序集。 Data.Services.Client.dll获取3.0版功能。


您可以手动替换程序集引用,甚至可以更好地安装WCF数据服务5.0安装程序应更新添加服务引用中的Visual Studio组件以按预期使用版本3.0功能。


https://www.microsoft.com/en-us/download/details.aspx ?id = 29306



最诚挚的问候,


Victoria  


Hi,

I'm receiving the following error after executing the following code. serviceContext returns MaxProtocolVersion as read only. How to modify MaxProtocolVersion and resolve this issue.

ServiceDetails serviceDetail = ConfigurationReaderHandler.Instance.GetServiceDetails("ZPURCHASE_ORDER_SRV");                                                
serviceContext = new ZPURCHASE_ORDER_SRV(new Uri(serviceDetail.Url));                            
serviceContext.AddAndUpdateResponsePreference = DataServiceResponsePreference.IncludeContent;//error 
//data fill - poItem 
serviceContext.AddObject("ZPURCHASE_ORDER_SRV", poItem);                
DataServiceResponse response = serviceContext.SaveChanges();

Error: The request requires that version 3.0 of the protocol be used, but the MaxProtocolVersion of the data service context is set to 2.0. Set the MaxProtocolVersion to the higher version, and then retry the operation.

解决方案

Hi Anandhan,

You need to add assembly called Microsoft.Data.Services.Client.dll to get the version 3.0 features.

You can either manually replace the assembly references, or even better install the WCF Data Services 5.0 setup which should update the Visual Studio components inside Add Service Reference to work with version 3.0 features as expected.

https://www.microsoft.com/en-us/download/details.aspx?id=29306

Best Regards,

Victoria 


这篇关于MaxProtocolVersion错误 - 适用于Microsoft的SAP Gateway的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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