I've got a ASP.NET Webapplication with ASP.NET Membership Provider for User and Rolemanagement.
There is also an second Project, something like a Webspider.
The Spider should read periodically the content of the Webapplication.
In the Page_Load Event of the Webapp Login-Page I check a Querystring (Something like an API-Key). If this query string is there I use the FormsAuthentication.SetAut
hCookie Method to Login a special User. If I test this directly in the browser, the login is working fine and I can access the other sites. If I try to do so with the spider I get only the content of the Login Page, even if I try to access other pages after I did the login. I use for this a WebClient Object:
WebClient client = new WebClient();
string s = client.DownloadString("http://localhost:50125/Account/Login.aspx?Pass=123");
s = client.DownloadString("http://localhost:50125/Default.aspx");
Is it possible that the WebClient doesn't support the AuthCookie? How can I solve my problem?