Reputation: 85
I have C# page to send parameters to an webservice and the webservice is not in the same project. I know the url of the webservice. How can I pass the parameters, I've tried the code below
Response.Redirect(" http://url/mobileservice.asmx/kioskOyunKodu?kioskkod='+kioskID+',kioskKodEncryped='+encodedCode+',okulno='+txt_StudentID.Text'");
Is there any other way to solve this issue when I execute that line I got
A potentially dangerous Request.Path value was detected from the client (:).
Upvotes: 0
Views: 590
Reputation: 2218
There is a space for creativity for this particular case:
GET
requestID
and then you can pass the id as a parameter between your service urlPOST
reqest with dataUpvotes: 1
Reputation: 3216
You Url is wrongly formed and you have included special character in your redirect URL. That why you received A potentially dangerous Request.Path value was detected from the client (:) exception.
Below is how URL are formed with querystring.
Response.Redirect("http://url/mobileservice.asmx/kioskOyunKodu?kioskkod="+ kioskID + "&kioskKodEncryped=" + encodedCode + "&okulno=" + txt_StudentID.Text);
Upvotes: 0