.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.

  1. change restful service use post, because send information server, , potentially change resource status, based on http protocol , should use post anyway.
  2. you can encode url base64

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -