I need a fully url encode email address.
HttpUtility.UrlEncode seems to ignore some characters, such as! and.
I need to pass the email address in the url created as follows:
/Users/me@example.com/Comments
Since my WebMethod uri pattern looks like this:
[WebGet(UriTemplate = "Users/{emailAddress}/Comments")]
The period breaks the WCF and will not pass the email address to my REST web service method. Removing a period conveys the value just fine. I hope there is a method that will encode all non-alphanumeric numeric characters, since everyone consuming this service will need to do this.
EDIT
I reviewed the use of:
Convert.ToBase64String(Encoding.ASCII.GetBytes("something+me@example.com"))
Most other languages have easy ways to convert a string to base64? My main problem is that our customers who consume this service will need to encode their email address using Java, PHP, Ruby, etc.
Vyrotek
source share