473,396 Members | 1,764 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,396 software developers and data experts.

URGENT:Sending cookie via HttpWebRequest

hi all
i really appreciate you help you got me through a lot with my project. YOU
GUYS ROCK BIGTIME!! :D

well now i have another question (as usual :S)
I do an httpwebrequest to my webmail, this request returns a response with a
cookie. I get the cookie and parse it using cookiecontainer object. I need
to then make another request to the same site but this time i want to send
the cookie back with my request since it has the session id etc.

is there a way to do so?

Thanks a lot...
Nov 16 '05 #1
4 1097
Hi Mustafa,

When you receive the response store the the CookieContainer into a variable
or property, then reattach it to the next WebRequest.CookieContainer.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
"Mustafa Rabie" <mr*******@hotmail.com> wrote in message
news:eq**************@tk2msftngp13.phx.gbl...
hi all
i really appreciate you help you got me through a lot with my project. YOU GUYS ROCK BIGTIME!! :D

well now i have another question (as usual :S)
I do an httpwebrequest to my webmail, this request returns a response with a cookie. I get the cookie and parse it using cookiecontainer object. I need to then make another request to the same site but this time i want to send
the cookie back with my request since it has the session id etc.

is there a way to do so?

Thanks a lot...

Nov 16 '05 #2
Hi Mustafa:

You can use static memebers of GlobalProxySelection to force all web
requests through a proxy server.

See http://odetocode.com/Blogs/scott/arc...06/29/290.aspx

--s
On Mon, 19 Jul 2004 00:27:21 +0300, "Mustafa Rabie"
<mr*******@hotmail.com> wrote:
hi all
i really appreciate you help you got me through a lot with my project. YOU
GUYS ROCK BIGTIME!! :D

well now i have another question (as usual :S)
I do an httpwebrequest to my webmail, this request returns a response with a
cookie. I get the cookie and parse it using cookiecontainer object. I need
to then make another request to the same site but this time i want to send
the cookie back with my request since it has the session id etc.

is there a way to do so?

Thanks a lot...


--
Scott
http://www.OdeToCode.com
Nov 16 '05 #3
thanks for your help. it worked :)

"Rick Strahl [MVP]" <ri********@hotmail.com> wrote in message
news:#Y**************@TK2MSFTNGP09.phx.gbl...
Hi Mustafa,

When you receive the response store the the CookieContainer into a variable or property, then reattach it to the next WebRequest.CookieContainer.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
----------------------------------
Making waves on the Web
"Mustafa Rabie" <mr*******@hotmail.com> wrote in message
news:eq**************@tk2msftngp13.phx.gbl...
hi all
i really appreciate you help you got me through a lot with my project. YOU
GUYS ROCK BIGTIME!! :D

well now i have another question (as usual :S)
I do an httpwebrequest to my webmail, this request returns a response with a
cookie. I get the cookie and parse it using cookiecontainer object. I

need
to then make another request to the same site but this time i want to

send the cookie back with my request since it has the session id etc.

is there a way to do so?

Thanks a lot...


Nov 16 '05 #4
Opsie, that reply wasnt intended for this thread!

On Mon, 19 Jul 2004 16:01:33 -0400, Scott Allen
<bitmask@[nospam].fred.net> wrote:
Hi Mustafa:

You can use static memebers of GlobalProxySelection to force all web
requests through a proxy server.

See http://odetocode.com/Blogs/scott/arc...06/29/290.aspx

--s


--
Scott
http://www.OdeToCode.com
Nov 16 '05 #5

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

Similar topics

10
by: Tony Archer | last post by:
Gentlemen, your urgent help is needed in solving a STRANGE problem. I have two servers a dev box, and a production box. On the dev box everything works fine, in production it hoses: One of...
1
by: Tony Archer | last post by:
(Forgive the dupicate post, I had left out the OS Version out of the prior post.) Gentlemen, your urgent help is needed in solving a STRANGE problem. I have two servers a dev box, and a...
7
by: Thaynann | last post by:
I am developin an application that access a web site, i can get to the first page of the site, but when i POST to get to other pages, it gives me a message (amongst the HTML code) "Session Timed...
5
by: Vishal | last post by:
Hello, I already asked this question in the ASP.NET forums, but no help came. So I am hoping that somebody can help me out. This is really very URGENT me. For my e-commerce application, I...
2
by: Vishal | last post by:
Hello, I am posting some credit card info to the payment server via a similar code. My code is written in VB.NET but uses the same approach. At the end however I do a...
1
by: Joe | last post by:
In ASP.NET 1.1 I could detected expired form authentication tickets (which closely coincide with my expired session) by checking for the Authentication Cookie when the login screen loads. If the...
3
by: bijeesh | last post by:
Hi all I have a scenario where i want to send the cookie with http request,please help me how to do this. here is my correct requirement ------------------------------------------- I want...
3
by: Dave | last post by:
string m_request = some_web_page; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(m_request ); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Which works...
14
by: Ananthu | last post by:
Hi I want to know how to send SMS from ASP.NET to mobile phones worldwide. I have searched lot of sites but they are dealing with connecting the mobile phones in the system and then sending SMS...
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
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,...
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...
0
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,...

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.