Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello everyone I'm trying to create the WCF rest service to upload the comments but my service will work fine if I use the space but when I use the enter or new line (\n or %oA) in the URI template then the service will give the error like HTTP Error 400. The request URL is invalid.


What I have tried:

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


Any suggestions how to solve this issue thanks in advance
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900