Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# HttpWebRequest problem [duplicate]

Possible Duplicate:
HttpWebRequest to URL with dot at the end

I am facing a weird problem. When I am trying to get a page using HttpWebRequest page is not coming properly. The url has a dot into it like http://www.xyz.com/abc./do . You can see this url has a dot into it. So when I am trying fetching that data using HttpWebRequest data is not coming properly. So I tracked it with fiddler and I saw this class omitting the dot like http://www.xyz.com/abc/do . How can I solve this problem ?

NB. This is not a real url. But the problem is real.

like image 842
Barun Avatar asked Jul 20 '26 21:07

Barun


1 Answers

may be encoding url solve the problem

HttpUtility.UrlEncodeUnicode(url)
like image 154
ehsan Avatar answered Jul 22 '26 11:07

ehsan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!