Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 881209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:13:28+00:00 2026-05-15T12:13:28+00:00

I need to fully URL Encode an email address. HttpUtility.UrlEncode seems to ignore certain

  • 0

I need to fully URL Encode an email address.

HttpUtility.UrlEncode seems to ignore certain characters such as ! and .

I need to pass an email address in a url formated like this:

/Users/me@example.com/Comments

Because my WebMethod uri template looks like this:

[WebGet(UriTemplate = "Users/{emailAddress}/Comments")]

The period breaks WCF and will not pass the email address to my REST webservice method.
Removing the period passes the value just fine. I’m hoping there is a method which will encode all non alpha numeric characters since everything consuming this service will need to do this.

EDIT

I had considered using:

Convert.ToBase64String(Encoding.ASCII.GetBytes("something+me@example.com"))

Do most other languages have easy ways to convert a string to base64? My main concern is that our customers who consume this service will need to encode the email address using Java, PHP, Ruby, etc.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T12:13:28+00:00Added an answer on May 15, 2026 at 12:13 pm

    I’ve discovered a solution to this issue.

    .Net 4.0 has actually fixed the problem with special characters in the URI Template.

    This thread pointed me in the right direction. http://social.msdn.microsoft.com/Forums/en/dataservices/thread/b5a14fc9-3975-4a7f-bdaa-b97b8f26212b

    I added all the config settings and it worked. But note, it ONLY works with a REAL IIS setup with .Net 4.0. I can’t seem to get it to work with the Visual Studio Dev IIS.

    Update – Actually, I tried removing those config settings and it still works. It maybe be that .Net 4.0 has fixed this problem by default.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to URL encode a non-latin string (japanese, chinese, or just non ascii
When I write class templates, and need to fully-specialize members of those classes, Doxygen
I need a way to wait until a (Swing) JComponent is fully painted. This
I need a way to remove ALL using statements from code and fully qualify
I need to perform action, when my activity is fully loaded? Does Android have
I find myself with a need for a java utility for taking a fully-qualified
I have a project which fully designed for smart phone and now, I need
I need to convert full state name to its official state address code. For
i have a full datetime object that i need to pass in as a
I need to pass a dictionary from a python script to a Django app.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.