WebClient - The remote server returned an error: (403) Forbidden.
Posted
by daniel
on Stack Overflow
See other posts from Stack Overflow
or by daniel
Published on 2010-05-08T13:33:55Z
Indexed on
2010/05/08
13:38 UTC
Read the original article
Hit count: 187
c#
Opening a public page from browser works fine.
Downloading same page using WebClient throws - (403) Forbidden.
What is going on here ?
Here is quick copy/paste example (used on console app) to specific page on web:
try
{
WebClient webClient = new WebClient();
string ss = webClient.DownloadString("http://he.wikisource.org/wiki/%D7%A9%D7%95%D7%9C%D7%97%D7%9F_%D7%A2%D7%A8%D7%95%D7%9A_%D7%90%D7%95%D7%A8%D7%97_%D7%97%D7%99%D7%99%D7%9D_%D7%90_%D7%90");
}
catch (Exception ex)
{
throw;
}
© Stack Overflow or respective owner