x
Main Site login Signup

Application crash during changing proxy server

Hello community. in my application i need to change proxy server every time interval, and during this change application crashing. i use this code to dispose previous WebView: browser.Stop(); Thread.Sleep(500); session.ClearCache(); session.ClearCookies(); browser.Dispose(); browser = null; WebCore.DestroyUnwrappedViews(); Thread.Sleep(500); and this to create new: session = WebCore.CreateWebSession(new WebPreferences() { ProxyConfig = ListProxy[m_nCurrentProxy] }); browser = WebCore.CreateWebView(1024, 768, session, WebViewType.Window); browser.Width = this.Width - panel2.Width; browser.ParentWindow = this.Handle; browser.LoginRequest += Awesomium_Windows_Forms_WebControl_LoginRequest; browser.LoadingFrameComplete += browser_LoadingFrameComplete; browser.DocumentReady += browser_DocumentReady; Thread.Sleep(500); browser.Source = new Uri(ListVideos[m_nCurrentVideo]);

dont use WebCore.Update(); Maybe something wrong? Also I noticed that if focus on my application change server going fine (at least more stable) then when focus on other application. Thanks for any help and offers for fix this. Sorry for my english.

asked Sep 05, 2016 at 01:55 PM avatar image Andrey 0
more ▼
(comments are locked)
10|1100 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.