Logo
My Account |  Site Map | Contact Us  
Welcome Guest Search | Active Topics | Sign In | Register

How to send additional headers using EO Webbrowser control in WindowsApp similar to .NET WebBrowserControl.Navigate() Options
Sanjeeth Samabngi
Posted: Friday, May 13, 2016 4:45:27 PM
Rank: Newbie
Groups: Member

Joined: 5/13/2016
Posts: 1
How to send additional headers using EO Webbrowser control in WindowsApp similar to .NET WebBrowserControl.Navigate() method.

In .Net WebBrowser control there is a Navigate method to pass url, and headers and etc. I am looking for similar one in EO Webbroswer control. If I send it using EO.WebBrowser.Request object, i don't get fully qualified url(i get url "/xxx/sesdf/sdfsf") in return and so i can't load the page in the control.

The Navigate method in .NetWebUserControl work perfect. Let me know the similar function/Method in EO WebBrowser Control.
eo_support
Posted: Friday, May 13, 2016 5:41:02 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 23,072
Hi,

You can either use LoadUrl or LoadRequest:

http://www.essentialobjects.com/doc/eo.webbrowser.webview.loadurl.aspx
http://www.essentialobjects.com/doc/eo.webbrowser.webview.loadrequest.aspx

If you use LoadUrl, you can attach additional header entries by handling BeforeRequestLoad event:

http://www.essentialobjects.com/doc/eo.webbrowser.webview.beforerequestload.aspx

If you use LoadRequest, you can just add additional header entry into the Request object's Headers collection.

Hope this helps. Please feel free to let us know if you still have any questions.

Thanks
koshybiju82
Posted: Friday, August 13, 2021 5:02:33 AM
Rank: Newbie
Groups: Member

Joined: 8/13/2021
Posts: 1
I am using EO.Webrowser 2018 version. I would like to send an additional header for authentication with the Load request.

The below code with .Net webBrowser is working fine.

Code: C#
string auth = System.Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(userName + ":" + password));
string headers = "Authorization: Basic " + auth + "\r\n";
_Browser.Navigate(serverUrl, string.Empty, null, headers);


Could you please let me know the equivalent for do the same operation in EO Webbrowser control? Thanks.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.