c# - Why does Uri.EscapeDataString return a different result on my CI server compared to my development machine? -
on desktop machine, this..
var result = uri.escapedatastring("zdskjhf&*^65sdfh/.<>\\sdf"); // result == zdskjhf%26%2a%5e65sdfh%2f.%3c%3e%5csdf
now, on ci server part of result not encoded.... this
\\ result == zdskjhf%26*%5e65sdfh%2f.%3c%3e%5csdf
notice asterisk in middle of sec result? in first result, it's getting encoded.
can explain what's going on, please?
update 1:here's .net fiddle using .net 4.5 , shows asterisk encoded...
so mean machine and .net fiddle both wrong ? or both right , ci server wrong?
some diagnostic info build server.. microsoft (r) build engine version 12.0.30723.0 [microsoft .net framework, version 4.0.30319.34209] copyright (c) microsoft corporation. rights reserved.
(i'm not sure how info, local dev machine. it's win8.1 + vs 2013 update 3.)
all projects .net 4.5 ...not 4.5.1
update 2:i've decided run code on .net frameworks (that matter). here's results.
data: abcde *.(.)." .net 2.0: abcde%20*.(.). .net 3.0: abcde%20*.(.). .net 3.5: abcde%20*.(.). .net 4.0: abcde%20*.(.). -- msdn notes: bug fixed here -- .net 4.5: abcde%20%2a.%28.%29. .net 4.5.1: abcde%20%2a.%28.%29. .net 4.5.2: abcde%20%2a.%28.%29. .net 4.5.3: abcde%20%2a.%28.%29.
this suggests that
<.net 4.5
, values not encoded. kewl, fine. >= .net 4.5
values encoded. link: this similar question. ref: this build result ci server includes lots of debug info...
.net 4.5 changed behavior of method. search "escape".
c# .net encoding
No comments:
Post a Comment