.net - Unable to pass a URL in GET request to a RESTful web service in C# -
i stuck @ unexpected issue in project. issue there url produced on fly in code have submit restful web service via request. e.g. url submit looks this: http://mysampleserver.com:8080/calc/8999/bpax
the restful server accepts url last parameter in format below:
http://myrestfulapi.domainname.com/capture/bbbb/http://mysampleserver.com:8080/calc/8999/bpax
i used system.net.httputility.urlencode(....) encode "url submit" first incorporate in restful service call.
that resulted in getting error below:
system.web.httpexception: potentially dangerous request.path value detected client (:)
to try resolve it, followed the steps described per web page no luck.
i using mvc 4 implement restful api in c#.
any clue or idea how around showstopper issue?
there @ least 2 solutions can think of.
- change restful service use post, because send information server, , potentially change resource status, based on http protocol , should use post anyway.
- you can encode url base64
Comments
Post a Comment