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

HttpWebRequest vs. AxWebBrowser

Hello,

I wrote a C# App with an internet connection over HttpWebRequest. To
navigate thru some sites i need a cookie (CookieContainer).

Now i want to call a form with a AxWebBrowser displayin the website. i
call the navigate methode to load the site but dont know how to set
the cookie. I tried the header parameter from the navigate method or
the AxHost but it wont work.

Thankfull for any help

MM
Nov 15 '05 #1
2 3417
MM,

How are you setting the cookie information in the header parameter as
part of the call to Navigate? You have to set the cookie in the correct
format.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Martin Madreza" <ma*********@yahoo.de> wrote in message
news:f4**************************@posting.google.c om...
Hello,

I wrote a C# App with an internet connection over HttpWebRequest. To
navigate thru some sites i need a cookie (CookieContainer).

Now i want to call a form with a AxWebBrowser displayin the website. i
call the navigate methode to load the site but dont know how to set
the cookie. I tried the header parameter from the navigate method or
the AxHost but it wont work.

Thankfull for any help

MM

Nov 15 '05 #2
Hi,

thanks.

Do you know the correct format.

Actually I tried this:

HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(uri);
webRequest.UserAgent = "Mozilla/3.0 (compatible; My Browser/1.0)";
webRequest.CookieContainer = cookieContainer;
string sHeader = cookieContainer.GetCookieHeader(uri)
//sHeader is something like id=56322110192
object oHeader = (object)sHeader;
Object o = null;
axWebBrowser.Navigate(sSomeUrl, ref o, ref o, ref o, ref oHeader);
MM
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:<#n**************@TK2MSFTNGP11.phx.gbl>...
MM,

How are you setting the cookie information in the header parameter as
part of the call to Navigate? You have to set the cookie in the correct
format.

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

Nov 15 '05 #3

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

Similar topics

0
by: Lecture Snoddddgrass | last post by:
Hi, I noticed that my WinForms app was taking a while to start up. I stepped through the code to find out which line was causing the delay. The delay is occurring within one of my UserControls...
4
by: TF | last post by:
hi, i am using AxWebBrowser control in my C# dot.net windows application. i want to display a web page in the browser that needs some data sent to it through HTML Form 'POST' method. I saw a...
4
by: Martin Ho | last post by:
Hey Everyone, I really hope there is someone who can figure out this problem. Honestly, I spent 3 days now trying to find the solution, but nothing works. I'll try to explain the problem...
0
by: Matthias Kwiedor | last post by:
I have a aplication which hosts an axWebbrowser. This activex component needs about 10 to 15 mb of memory. Because i have a option to move the aplication to tray icon and do some timer work i...
1
by: Bill Woodruff | last post by:
I wrote an application which uses WebRequest to access several thousand small graphics file on an on-line server, uses GetResponseStream and Image.FromStream to copy their contents, and then saves...
0
by: Martin Madreza | last post by:
Hello, hope this question wasn't ask to often... I wrote a C# App with an internet connection over HttpWebRequest. To navigate thru some sites i need a cookie (CookieContainer). Now i want...
3
by: Clint MacDonald | last post by:
I have used the AxWebBrowser in a Visual Basic Project... I found that both Framework 1.0 and 1.1 had to be installed for it to work properly. I now have found that in Studio 2003, that the...
7
by: Doe | last post by:
Okay, I've given up on using the "new" WebBrowser in 2005 to do what I want to do -- tabbed browsing. It seems I really need RegisterAsBrowser and Application to get each instance of a browser...
6
by: Dave Booker | last post by:
It appears that I cannot correctly install the AxWebBrowser in VS2005. I can instantiate an "AxWebBrowser browser" and refer to its members, properties, and methods. I'm having trouble with the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.