By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,830 Members | 1,722 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,830 IT Pros & Developers. It's quick & easy.

C# Httpwebrequest load local stored cookie value.

P: 3
Hello, I am making a screen scraper, in other programs I have been able to log into a site, get the cookie, submit a form and read the results.

However, this time I am in troubles, the site I need to log is using a local stored cookie or some info in it, since I can access OK from the IE, but when I log from the program I get some errors.

I am using Fiddler to check the cookie values and the cookie I get from the site in the screen scraper program is different from the values that use the local stored cookie.

I have made tests and if I delete the local stored cookie, I am not able to access, even from the IE. The site uses some kind of IP reservation and grants permissions to it on the first login, I think it stores some data in the cookie.

So what I need to know is how to LOAD o CREATE a cookie from a IE file.

Regards
Jun 20 '07 #1
Share this Question
Share on Google+
4 Replies


kenobewan
Expert 2.5K+
P: 4,871
What are the errors?
Jun 21 '07 #2

P: 3
What are the errors?
I get an "Invalid user or password", I think it has to be with the local stored cookie, because when you delete it from IE temp. folder you can not login even from IE.

I am sending the same request as detected from fiddler, my request and IE requests are the same except for the cookie.
Jun 21 '07 #3

Plater
Expert 5K+
P: 7,872
Is it a session cookie?
Is it a string of digits? It's possible that it's encoded with say a time value or some other random seed type thing. (It's probably at very lest base64 encoded)
Jun 21 '07 #4

P: 3
Is it a session cookie?
Is it a string of digits?
It's possible that it's encoded with say a time value or some other random seed type thing. (It's probably at very lest base64 encoded)
I have accesed the cookie file and it has this string:
"
IdCtrl
87383737A
subdomain.domain.com/
1024
3229943808
30223977
234922848
29863862
*
"

When I check in fiddler the cookie after I login in IE, I can see the variable:value that it loads, it loads always the same data.

If I delete the cookie, I have to ask the people from this site to reset my password, then I can log again and keep doing this.

Is this info helpful?
Jun 21 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.