Page Scraping of Authenticated pages with CredentialCache.DefaultCredentials

G

Guest

According to miscellaneous posts, this should work to the
effect of helping overcome FormsAuthentication when the
user is already logged in. In my case, the page that gets
scraped is the forms login page :?(.

Somehow the default credentials do not work on the new
WebRequest object.

Any amount of help will be appreciated,

Thanks,
Yuri

CookieContainerObject.Add(Cookie);
WebRequestObject.CookieContainer = CookieContainerObject;
WebRequestObject.Credentials =
CredentialCache.DefaultCredentials;

WebResponseObject = (HttpWebResponse)
WebRequestObject.GetResponse();
 
Y

yuri vanzine

Forgot to mention that I did try

<identity impersonate="true"/> in the admin section of the
site

which did not work.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top