Rank: Advanced Member Groups: Member
Joined: 12/30/2013 Posts: 68
|
When I am downloading a file, sometimes the DownloadCompleted method does not get called. I know that by the printStackTrace (trace logging) function that I have set to run on each process.
This is imperative that it works correctly. Is there something I am missing? I am running version 3.0.112 of the browser control.
private void webView1_DownloadCompleted(object sender, DownloadEventArgs e) {
printStackTrace("Download Complete", strDownloadedFile); picLoading.Visible = true; string Filename = Path.GetFileName(strDownloadedFile); ProcessStartInfo mySI = null;
try { mySI = new ProcessStartInfo(); mySI.FileName = Path.Combine(strDownloadedPath, Filename); mySI.Verb = "open"; mySI.UseShellExecute = true; System.Diagnostics.Process.Start(mySI); printStackTrace("Filename =", mySI.FileName); } catch (Exception ex) { printStackTrace(ex.ToString(), ex.StackTrace); picLoading.Visible = false; }
finally { picLoading.Visible = false; printStackTrace("Ending myProcess", "Ending myProcess"); } mySI = null; }
private void webView1_BeforeDownload(object sender, BeforeDownloadEventArgs e) { picLoading.Visible = true; e.FilePath = Path.Combine(myWorkingFolder, Utility.Util.MakeSafeForNTFS(Constants.ClientWorkingFolderName + "\\Temp\\")); e.ShowDialog = false; strDownloadedPath = e.FilePath.ToString(); printStackTrace("BeforeDownload", strDownloadedPath); }
|
Rank: Advanced Member Groups: Member
Joined: 12/30/2013 Posts: 68
|
I just added webView1_DownloadUpdated to my code. It does get called, but the complete function still does not get called.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,273
|
Hi,
We will look into this and see if we can find anything. If we can not reproduce this on our side, we may need you to send us a test project.
Thanks!
|