c# - Different behavior System.Uri -


i'm newbie .net 4.5 version.

i have written library use class system.uri object. when invoke code:

uri uri = new uri("http://myurl/%2f"); 

in console application create new uri object absoluteuri set

"http://myurl/%2f",  

but when invoke same code in web service application absoluteuri set

"http://myurl//" 

how can use "%2f" without conversion in server aplication

%2f convert /

try

http://myurl/%252f 

%25 equal % %252f convert %2f @ server side, expected

uri uri = new uri("http://myurl/%252f"); uri.localpath //  "/%2f" 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -