473,395 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 1357
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********@nospam.tpg.com.au> wrote in message
news:eD**************@TK2MSFTNGP12.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.CookieContainer class.
--
John Saunders
johnwsaundersiii at hotmail
Jul 21 '05 #3
Hi John,

In order to do this in a program, you should look at the
System.Net.CookieContainer 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**********@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hi John,

In order to do this in a program, you should look at the
System.Net.CookieContainer 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
johnwsaundersiii at hotmail
Jul 21 '05 #5

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

Similar topics

3
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...
3
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)...
0
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...
4
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...
4
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...
4
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...
2
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...
2
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...
1
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) ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...
0
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...

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.