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 3671900
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:32:36+00:00 2026-05-19T02:32:36+00:00

I am making an HttpWebRequest at a url similar to this: http://mysite.com/search?query=my+search+string Problem is,

  • 0

I am making an HttpWebRequest at a url similar to this:

"http://mysite.com/search?query=my+search+string"

Problem is, the Uri class escapes it with %, and the site I’m making the request against can’t handle the escaped characters. (I have no control to fix the site)

So tried this [Obsolete] constructor:

new Uri(myUriString, true);

But it did not seem to make any difference, when debugging, my Uri still got escaped.

I am running this on a Mac with Mono, but I have not tried it on standard .Net on Windows to see if it has the same behavior.

Is there another way to get around this issue?

  • 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-19T02:32:37+00:00Added an answer on May 19, 2026 at 2:32 am

    I ran

    Uri uri = new Uri("http://mysite.com/search?query=my+search+string");
    Console.WriteLine(uri.ToString());
    

    through Microsoft .NET Runtime and Mono on a Windows 7 machine and it did not escape the characters. Are you sure this URL isn’t getting appended to another url where it thinks this is a query parameter?

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

Sidebar

Related Questions

Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created
I am having trouble making calls to multiple URI's , currently this works in
In my WP7 app I use HttpWebRequest class to make http call to webservice
When making an HttpWebRequest within a CLR stored procedure (as per the code below),
I'm trying to debug an application that is making a WebRequest synchronously, ie.: HttpWebRequest
I'm making a request to a website via the HttpWebRequest/HttpWebResponse objects. I'm making several
I have a schedule task that is making a webrequest. This was all working
I am making a Http Webrequest to an available site that I can visit
I'm trying isolate a problem I'm having making an XML RPC call: XDocument doc
What I'm looking to do is make an HTTP post to a server URL

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.