开发者

issue with posting to WCF REST service

I created a REST service using WCF. It has 2 operations; one has [WebGet] applied to it and works fine both on开发者_开发技巧 localhost and on my production server.

But, the other operation that has the following attribute applied to it works the only localhost, not on the production server. Can anybody tell me what could be wrong here?

The attribute in question is:

[WebInvoke(Method = "POST",
           BodyStyle = WebMessageBodyStyle.Wrapped,
           ResponseFormat = WebMessageFormat.Json,
           RequestFormat = WebMessageFormat.Json,
           UriTemplate = "CreateUser")]

The error that I am getting is a bad request (400). The JSON request sent is the same for both localhost and prod server. It also has content type set to application/json.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜