Rank: Member Groups: Member
Joined: 12/2/2015 Posts: 25
|
Hi, we always get an error in browser control if we download a file the file we get by a AJAX-Call to a JSF-Portlet
WebView.LoadFailed is raised ErrorCode: ProceedAsDownload ErrorMessage: "Error code:1"
Event calls: WebView_BeforeNavigate WebView_LoadFailed WebView_BeforeDownload
if I stop in BeforeNavigate in Debug-Mode for few seconds the LoadFailed-Event is not raised
why is there an error and why are there differences between normal and debugging mode?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
This is normal. When a request is handled as download, the original request will raises the LoadFailed event with error code "ProceedAsDownload" and then the download related events will be called (such as BeforeDownload as you observed).
The reason that you see different events in debugging mode is the timing. BeforeNavigate must return quickly because the whole browser engine is blocked while this event is in progress. For that reason the browser engine will only wait for a very short time for this event. If you do not return within this time (which is the case if you pause at a breakpoint), the browser engine will give up the request to avoid deadlocks inside the browser engine.
Thanks!
|