如何使用wcf rest服务在uri模板中传递%0A

时间:2017-02-20 11:47:10

标签: rest wcf

大家好我正在尝试创建wcf休息服务来上传评论,但是如果我使用空间但是当我在uri模板中使用输入或新行(\ n或%oA)时,我的服务将正常工作然后服务会给出错误 HTTP错误400.请求网址无效。

 [OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "comment/{comments}", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
string comment(string comments);

提前感谢如何解决此问题的任何建议

0 个答案:

没有答案
相关问题