sample message :login=admin&password=password&TranId=0617759203&TranType=9220
I have a WCF service with the following method
[OperationContract(Name = "GetSampleMethod")]
[WebGet(UriTemplate = "GetSampleMethod/inputStr/{data}")]
string GetSampleMethod(string data);
i am able to send just a single string /Service.svc/GetSampleMethod/inputstr/abc as data. When i tried to send the sample message as data i am getting the following error:
A potentially dangerous Request.Path value was detected from the client (&).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: A potentially dangerous Request.Path value was detected from the client (&).
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): A potentially dangerous Request.Path value was detected from the client (&).]
System.Web.HttpRequest.ValidateInputIfRequiredByConfig() +9672068
System.Web.PipelineStepManager.ValidateHelper(HttpContext context) +53
Could anyone please help me with this? How do i need to send this type of message as query string?