473,809 Members | 2,687 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Responding to Cookie Requests

I'm using the HttpWebRequest and HttpWebResponse components to automatically
scrape content from various internet news sites to store on my iPaq PDA
which I later read off-line while commuting to/from work. I don't have room
on the PDA for all the associated advertising stuff these sites have, so I
filter out all but the important text.

It's worked a treat until recently when 1 of the sites I read upgraded.
When I browsed to it using IE, I had to sign-on and accept a cookie from the
server. On subsequent visits to the site using IE, the cookie is read and
the sign-on is bypassed automatically.

Does anyone now how I can automate the reply to the cookie request inside a
dotNet application?

Regards
Ian
Jul 21 '05 #1
4 1381
Hi Ian,

Some webpages are more and more thrash. Microsoft is starting to do things
to prevent that, did you read this article before you do a lot of work.

http://msdn.microsoft.com/security/d...p2websites.asp

I do not know if your problem is on it (When I understand your problem well,
than is it the dynamic website), and when it is prevented by the servicepack
2 (I doubt it), you do maybe a lot of not needed work.

Otherwise you can maybe just set the security mode in IE in a way that it
does not accept cookies. (Hard today, however maybe the remedy)

I hope this helps?

Cor
Jul 21 '05 #2
"Ian Mooney" <ia********@nos pam.tpg.com.au> wrote in message
news:eD******** ******@TK2MSFTN GP12.phx.gbl...
I'm using the HttpWebRequest and HttpWebResponse components to automatically scrape content from various internet news sites to store on my iPaq PDA
which I later read off-line while commuting to/from work. I don't have room on the PDA for all the associated advertising stuff these sites have, so I
filter out all but the important text.

It's worked a treat until recently when 1 of the sites I read upgraded.
When I browsed to it using IE, I had to sign-on and accept a cookie from the server. On subsequent visits to the site using IE, the cookie is read and
the sign-on is bypassed automatically.

Does anyone now how I can automate the reply to the cookie request inside a dotNet application?


Ian,

There isn't actually a "cookie request". Instead, the web client (or
browser) sends on each request the cookies appropriate to the request. This
is determined by the domain and path of the cookie vs. the domain and path
of the request. It is further determined by client privacy settings.

In order to do this in a program, you should look at the
System.Net.Cook ieContainer class.
--
John Saunders
johnwsaundersii i at hotmail
Jul 21 '05 #3
Hi John,

In order to do this in a program, you should look at the
System.Net.Cook ieContainer class.


Is this not special made for the serverside so that you to can control the
user cookies when there are more webservers at the same time doing the same
client and not for the clientside to control cookies made by such a server?

Cor
Jul 21 '05 #4
"Cor Ligthert" <no**********@p lanet.nl> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
Hi John,

In order to do this in a program, you should look at the
System.Net.Cook ieContainer class.
Is this not special made for the serverside so that you to can control the
user cookies when there are more webservers at the same time doing the

same client and not for the clientside to control cookies made by such a

server?

I've used the CookieContainer client-side as a place to hold cookies sent by
the server and a place for cookies which the client might send back to the
server.
--
John Saunders
johnwsaundersii i at hotmail
Jul 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1681
by: Eþref DURNA | last post by:
My Aim is to make a windows application download which support session and cookies. There is a web site which gives images as links like this http://www.comstock1700k.com/download/22570094.jpg?h=3b456ad7eceff24e9ad547e1dfa96098&t=1132241687&u=esref When ever I click to save as a target as or download using flash get that programs could download the file correctly but when ever I use WebClient or httprequest it sends me to the login...
3
7381
by: Karsten Grombach | last post by:
Hi, I'm trying the following: - Imitate a Logon using a Post with HttpWebRequest on remote Webserver (asp 3.0 page using https) - On success redirect to the page (encapsuled in an iframe) supplied by the remote Webserver I can successfuly logon but when I redirect to the supplied url, the webserver does not know me anymore an redirects me back to login page.. I
0
943
by: Peter Row | last post by:
Hi, I have a legacy VB6 webclass app that has been directly ported to VB.NET. My .NET webclass infrastructure works in more or less the same way but is now specific to my app and not the generic like the original MS version. This is all implemented in 1 DLL using a series of HttpHandlers and HttpModules. Anyhow, I need to do manual authentication ticket handling, which in this case I use an MD5 hash for.
4
5647
by: 23s | last post by:
I had this problem in the past, after a server reformat it went away, and now after another server reformat it's back again - no clue what's doing it. Here's the flow: Website root is public, no SSL no forms auth. One of the subfolders in the public area is the root of a "protected" area; SSL is required from this subfolder on forward and a web.config in the subfolder specifies forms authentication. From the public area, I provide a...
4
1251
by: nico | last post by:
I store the authenticated user in a session cookie. This cookie expires after an hour. Now for some reason sometimes the client browser decides not to send the session cookie information with a new request. This means the server receives a request without user information and redirect the user to the login page. Somebody any bright ideas? TX!
4
985
by: Ian Mooney | last post by:
I'm using the HttpWebRequest and HttpWebResponse components to automatically scrape content from various internet news sites to store on my iPaq PDA which I later read off-line while commuting to/from work. I don't have room on the PDA for all the associated advertising stuff these sites have, so I filter out all but the important text. It's worked a treat until recently when 1 of the sites I read upgraded. When I browsed to it using...
2
2029
by: achoo | last post by:
I have two versions of the same program that send requests to a Web service. One version is a Windows application written in C#, and it properly handles a cookie created by the Web service. All I had to do was make sure that the proxy for the Web service had an initialized CookieContainer. The second version is an ASP.NET Web application, and it never receives the expected cookie from the Web service. I can tell because a breakpoint...
2
6253
by: HopfZ | last post by:
Server sends cookie to browser and the browser send the same cookie back to the server according to Wikipedia. Do browsers send even javascript-generated cookie to servers? For example, if I browse to a page on a server and if the content of the page is the following: <html> <head><script> alert(document.cookie);
1
1431
by: tohnsm | last post by:
Hi. I have been trying to create a cookie container. But the cookie I have stored is not correct. Below is the code: request = CType(WebRequest.Create("....."), httpWebRequest) request.CookieContainer = New CookieContainer() myCookie = request.CookieContainer ' store the cookie as global variavble
0
9602
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10639
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
10376
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
10383
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
9200
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
7661
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
5550
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...
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.