0

I can access several sites using my C# program. I have accounts at the sites and have set the option "remember me". In each account I also authorized anon access as required recently by the EU.

The program runs fine on several BOINC project sites: setiathome, milkyway, Einstein, etc, but not at WorldCommunityGrid. in the below line of code, after stepping through the myUri, its contents can be copied and pasted into edge or chrome and the correct page is displayed. The contents of "RawPage" match on all sites except WCG. The contents (of RawPage) match what one would see if one was not logged in. So basically if I copy and paste the url into edge it works, but not in my C# program.

RawPage = client.DownloadString(myUri);

1 Answers1

0

You have to do the authentication via WebClient and add the response cookie to each request you make to the protected side.

Please also see: Using CookieContainer with WebClient class

Vanice
  • 676
  • 5
  • 15
  • By authenticate I assume you mean passing credentials into the Webclient? That wont fly as no one wants to provide that information. My program is at stateson.net/HostProjectStats and provides info for users. – Joseph Stateson Apr 09 '19 at 20:31