本文介绍了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设置为更高版本,然后重试该操作。

解决方案

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.

解决方案


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

10-28 16:36