I am using Uri.EncodeDataString to send a query string on a URL. The original string is: Photo($select=Name,Id)
In my asp.net web service running in the VS2015 debugger, Uri.EncodeDataString will return: Photo(%24select%3DName%2CId)
However, in an NUnit test running under the Resharper test runner in VS2015, it returns: Photo%28%24select%3DName%2CId%29
. Notice the difference in the encoding of the parentheses.
Why are the parentheses encoded in the unit test but not in the web service? Shouldn't the parentheses be encoded in the web service? I'm running under .Net 4.6, so I shouldn't be affected by the RFC 3986 issue discusssed elsewhere on StackOverflow (here, here, here and a plethora of other places around the net).