Use Uri.EscapseUriString() instead of HttpUtility.UrlEncode()

* switch back to client profile instead of full framework
* fix some unit tests