最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

System.Net.ProtocolViolationException: Cannot send a content-body with this verb-type. Dynamics Ax 2012 Json Service

网络文摘 alirazazaidi 3764浏览 0评论

The piece of code you wrote, take long way to reach production server. And usually different errors occurs when we take code one server to other.  I test restful service code C# class and call it form X++  code multiple times and it works perfectly fine on QA. But when I took same code to Uat server it started throw following error

System.Net.ProtocolViolationException: Cannot send a content-body with this verb-type.

 

And why the same code works perfectly on DEV while calling same service method UAT throw errors.

 

 

 

 

Any how I found that I missed the request. Method = Post  in code snippet I used for service call. something like

 

request.Method = “POST”;

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址