views:

36

answers:

0

Hi

I trying to get page from this url: YandexMarket

but WebClient and httpWebRequest throw exception

Illegal characters in path.

HttpUtility.UrlEncode doesnt work for this symbol "-".

Firefox and other browser are correctly open the page.

Here is my code:

public string GetPage(string url)
{
    var wReq = (HttpWebRequest)WebRequest.Create(url);
    return new StreamReader(wReq.GetResponse().GetResponseStream()).ReadToEnd();
}

How i can get the page?

Sorry guys. All ok.