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

How add cookie to webbrowser control ?

Hi !

I am trying to add a cookie to a webbrowser component hosted inside a
windows forms window and perform a call.

ala, browser.Navigate( xxx,yyy, zzz, strHeader)

where strHeader contains "Cookie: key=value\n\r"

But, the control seems to ignore this header ( it's not seen on the
serverside)

Can I in any way add a cookie to this browser component ??
ie altering the string in any way ??
using underlying interface/component ??

Ideas ??

Thanks

Claes R.


May 23 '06 #1
1 8871
On Tue, 23 May 2006 08:46:02 -0700, claes R <claes
R@discussions.microsoft.com> wrote:
Hi !

I am trying to add a cookie to a webbrowser component hosted inside a
windows forms window and perform a call.

ala, browser.Navigate( xxx,yyy, zzz, strHeader)

where strHeader contains "Cookie: key=value\n\r"

But, the control seems to ignore this header ( it's not seen on the
serverside)

Can I in any way add a cookie to this browser component ??
ie altering the string in any way ??
using underlying interface/component ??

Ideas ??

Thanks

Claes R.

I'm not sure if this is what you want but I have to make a call to a
server from a WebBrowser control and need to add a cookie to support
that I've already been authenticated. I get the cookie from the
HtmlDocument that is being held by the WebBrowser after all the login
activity has finished. I then use UriBuilder to append an '&' and the
contents of the cookie, i.e. 'something=somethingelse', to the URI's
query section.

This assumes you have the cookie already and just need a simple
mechanism to get it back to the server while making your request.

--
Ken Wilson
Seeking viable IT employment in Victoria, BC
Feel free to contact me if you have any leads.
Jun 1 '06 #2

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

Similar topics

5
by: Noozer | last post by:
I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a few difficulties with it. Just looking for a few pointers, not whole solutions here. I've tried looking at the MSDN help files...
0
by: Derek Jo | last post by:
I am currently using WebBrowser to navigate to a page which require cookies (username and usertype). What I am going to do is, when user click the button, I will popup WebBrowser and navigate to...
9
by: ASP .NET Newbie | last post by:
How can I run a WebBrowser control using ASP.NET/VB.NET? I know I can use the WebClient to get the page data, but I need to be able to use the WebBrowser (AxWebBrowser)? Thanks, Chad
0
by: Jim Hubbard | last post by:
How would I implement the IDispatch interface to handle the following in VB.Net <BEGIN> Controlling Download and Execution The WebBrowser Control gives you control over what it downloads,...
12
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but...
8
by: Prosperz | last post by:
Hi, I would like to make thumbnails of web page by capture content of a WebBrowser. By example, capture http://www.google.com. I used WebBrowser control with Framework 2.0. I try this : ...
11
by: Anil Gupte | last post by:
....and how do I insert one into my form? I used in VB 6.0 last, but cannot figure out where it is in .Net Thanx, -- Anil Gupte www.keeninc.net www.icinema.com
5
by: kimiraikkonen | last post by:
Hi, I couldn't find a necessary class which shows when mouse hovers on a link in Webbrowser control. Think of there's a status bar(text), when mouse comes on a link, the URL must be shown in...
1
by: dschu012 | last post by:
I am logging into a site using a WebBrowser. Once I log in I want to save an Image from within it without having to make the WebBrowser navigate to the URL where the Image is stored. Currently I am...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
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...

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.