You need to set a user-agent before your request.

-X!

On Apr 28, 2010, at 10:39 PM, Rojan Ulak wrote:

i'm trying to run this query from my .net code and i'm getting 403 Forbidden message, this was working fro me last month i tested it.

 WebClient cleint = new WebClient();
            cleint.BaseAddress = "http://en.wikipedia.org/";
            string url = @"w/api.php?action=query&list=categorymembers&cmtitle=Category:Physics";
            string htmlCode = cleint.DownloadString(url);    //This is where i get the Exception.


Any Idea Guys?



The New Busy is not the old busy. Search, chat and e-mail from your inbox. Get started.
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api