473,625 Members | 3,318 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

C# Httpwebrequest load local stored cookie value.

3 New Member
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
4 4116
kenobewan
4,871 Recognized Expert Specialist
What are the errors?
Jun 21 '07 #2
gcervantes
3 New Member
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
7,872 Recognized Expert Expert
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
gcervantes
3 New Member
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.domai n.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

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

Similar topics

5
5475
by: grz02 | last post by:
A question on html-forms: We have an application where users will get a CD with, among other things, some html-forms for them to fill in. When they click the submit-button, the data is transferred to a webserver php-script that will then process the info. The forms-definition looks something like this: <form action="http://www.ourdomain.com/receiver.php" method="post"> <p>Question 1:
1
3211
by: Satinderpal Singh | last post by:
Hi everyone, We are using HttpWebRequest to create a request to a URI, which requires us to login first. In order to process all the transactions, first we have to login and get the cookie value in a variable and make the request again with that cookie as a header value (Digest Authentication). But, the problem we are facing is: That the HttpWebRequest is getting two responses simultaneously, which means that the code should wait after...
10
19341
by: Gregory A Greenman | last post by:
I'm trying to write a program in vb.net to automate filling out a series of forms on a website. There are three forms I need to fill out in sequence. The first one is urlencoded. My program is able to fill that one out just fine. The second form is multipart/form-data. Unfortunately, I haven't been able to fill that out in a way that makes the server happy. I set up a copy of this form at my web site so that I could see exactly what a...
1
2789
by: Satinderpal Singh | last post by:
Hi everyone, We are using HttpWebRequest to create a request to a URI, which requires us to login first. In order to process all the transactions, first we have to login and get the cookie value in a variable and make the request again with that cookie as a header value (Digest Authentication). But, the problem we are facing is: That the HttpWebRequest is getting two responses simultaneously, which means that the code should wait after the...
14
2964
by: tomer | last post by:
Clear DayHello, I have implemented a download manger in .NET that overrides Internet Explorer's bult-in download manager. I using HttpWebRequest/Response to download the files. All is working well except when I try to download an attachment file from a web-based mailbox. I've tried using credentials and saving the cookies, nothing helps.
2
4809
by: Keith Patrick | last post by:
I'm trying to programmatically post data to another page within my ASP.Net app. Not POSTing is not an option (I can't store this data in my session, context, hidden fields, or anything else...I've exhausted all my other options, so I have to get this scenario working). Basically, if I POST the data normally, it works fine, except the target page has a new session ID, so I lost the session data that I *do* transfer around. However, if I...
11
15864
by: Keith Patrick | last post by:
Could someone explain to me the relationship between these two classes? I am ripping my hair out trying to divert an HttpRequest to a new location via an HttpWebRequest, but I cannot get my session xfer to work, possibly due to the cookies not being compatible. I've spent over a week trying to get the HWR to integrate nicely with my app, but I cannot get the session to transfer, and it'd probably take me even longer if I tried to digest...
0
1507
by: Alex Papadimoulis | last post by:
Hey Group, I'm in the process of converting an ASP-based site to an ASP.NET site and built a control that wraps around an ASP page. The control simply does a GET to the same server to render the ASP content, and then just writes it to the page. In development and testing, there were no problems. Once deployed to production, after the site runs for a few hours, it starts to slow down and throw countless "Operation Has Timed Out"...
0
2031
by: Alex Papadimoulis | last post by:
Hey Group, I'm in the process of converting an ASP-based site to an ASP.NET site and built a control that wraps around an ASP page. The control simply does a GET to the same server to render the ASP content, and then just writes it to the page. In development and testing, there were no problems. Once deployed to production, after the site runs for a few hours, it starts to slow down and throw countless "Operation Has Timed Out"...
0
8256
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8694
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8635
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8356
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7184
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6118
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4089
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4193
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.