Open GoogleCodeExporter opened 8 years ago
Maybe it is the code inside WebKit that fails or you use a seperate thread. Try
putting WebKitBrowser.ActivateContext above the code and
WebKitBrowser.DeactivateContext at the end.
Also, please tell me what the exception is
Original comment by tsumalis96@gmail.com
on 4 May 2012 at 9:19
I would like to open-webkit-sharp development of the browser can open multiple,
and you can set a different cookie location or independently of each other.
I see the project information, there are:
setCookieStorage, and setPrivateBrowsingEnabled, but I try to use the failure.
This is my code, please help me. Thank you! !
code:
void Button3Click(object sender, EventArgs e)
{
WebKit.WebKitBrowser eb3 = new WebKit.WebKitBrowser();
eb3.WebView.preferences().setPrivateBrowsingEnabled(1);
WebKit.WebKitBrowser.ActivateContext();
WebKit.Interop.WebCookieManagerClass xy = new WebKit.Interop.WebCookieManagerClass();
//IntPtr p = xy.cookieStorage();
//MessageBox.Show(p.ToString());
IntPtr st = new IntPtr(13145);
xy.setCookieStorage(st);
WebKit.WebKitBrowser.DeactivateContext();
eb3.Location = new System.Drawing.Point(430, 53);
eb3.Size = new System.Drawing.Size(175, 223);
this.Controls.Add(eb3);
eb3.Url = new Uri("http://www.google.com");
}
Original comment by Neilyi...@gmail.com
on 9 May 2012 at 11:59
is there an exception that occurs when running that code? Or it is just not
effective?
Original comment by tsumalis96@gmail.com
on 10 May 2012 at 7:08
That code can't run.
In the code: eb3.WebView.preferences (). SetPrivateBrowsingEnabled (1);
Tip: Object reference not set to an instance of an object.
If you do not use eb3.WebView.preferences (). SetPrivateBrowsingEnabled (1);
Error in the back of the code: xy.setCookieStorage, (st);
Tip: trying to read or write protected memory. This is usually an indication
that other memory is corrupt.
Original comment by Neilyi...@gmail.com
on 11 May 2012 at 1:01
Attachments:
This means that WebKit doesn't allow you to do this. The only thing I found
about seperate sessions is this:
http://code.google.com/p/igisolatedcookiewebview/source/browse/
But I failed to implement it in OpenWebKitSharp.
Original comment by tsumalis96@gmail.com
on 14 May 2012 at 2:18
Original issue reported on code.google.com by
Neilyi...@gmail.com
on 2 May 2012 at 2:26