发布到WCF REST服务的问题

时间:2009-10-14 10:04:23

标签: wcf rest post

我使用WCF创建了一个REST服务。它有2个操作;一个人已经应用了[WebGet],并且在localhost和我的生产服务器上都可以正常工作。

但是,应用了以下属性的其他操作仅适用于生产服务器上的localhost。谁能告诉我这里有什么问题?

有问题的属性是..

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

我得到的错误是错误请求(400)。发送的JSON请求对于localhost和prod服务器都是相同的。它的内容类型也设置为application / json。

谢谢, 拉姆金。

0 个答案:

没有答案
相关问题