You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If Smart Screen is disabled, and the user downloads a potentially harmful file (e.g. msixbundle), the displayed message depends on whether a handler is subscribed to the DownloadStarting WebView2 event:
"File was blocked" message is shown if the client app is subscribed to DownloadStarting.
"Do you want to keep it?" question is shown if the client app is not subscribed to DownloadStarting.
Impact on our application
In our application we have to disable Smart Screen and have to handle the DownloadStarting event. The "file was blocked" message displayed to our users is too strict and we would like to use the "Do you want to keep it?" question instead, because in that case the possible choices are more accessible to users.
Importance
Important. My app's user experience is significantly compromised.
MainWindow.InitializeWebView() is extended with this line to disable Smart Screen. WebViewSettings.IsReputationCheckingRequired = false;
MainWindow.InitializeWebView() is extended with this line to add a handler to the DownloadStarting event: webView.CoreWebView2.DownloadStarting += WebView_DownloadStarting;
The WebView_DownloadStarting handler method has an empty implementation.
For convenience, the default background image and default URL of new windows are removed.
Steps to reproduce When subscribed to DownloadStarting
Build the WebView2WpfBrowser solution from the repo
What happened?
Summary
If Smart Screen is disabled, and the user downloads a potentially harmful file (e.g. msixbundle), the displayed message depends on whether a handler is subscribed to the
DownloadStarting
WebView2 event:"File was blocked" message is shown if the client app is subscribed to
DownloadStarting
."Do you want to keep it?" question is shown if the client app is not subscribed to
DownloadStarting
.Impact on our application
In our application we have to disable Smart Screen and have to handle the
DownloadStarting
event. The "file was blocked" message displayed to our users is too strict and we would like to use the "Do you want to keep it?" question instead, because in that case the possible choices are more accessible to users.Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
125.0.2535.79
SDK Version
1.0.2535.41
Framework
WPF
Operating System
Windows 10, Windows 11
OS Version
No response
Repro steps
Sample repo
URL: https://github.com/gkerenyi/WebView2SamplesForDownloadTest.
It is a fork of https://github.com/MicrosoftEdge/WebView2Samples with the following changes:
MainWindow.InitializeWebView()
is extended with this line to disable Smart Screen.WebViewSettings.IsReputationCheckingRequired = false;
MainWindow.InitializeWebView()
is extended with this line to add a handler to theDownloadStarting
event:webView.CoreWebView2.DownloadStarting += WebView_DownloadStarting;
WebView_DownloadStarting
handler method has an empty implementation.Steps to reproduce
When subscribed to DownloadStarting
When not subscribed to DownloadStarting
MainWindow.InitializeWebView()
:webView.CoreWebView2.DownloadStarting += WebView_DownloadStarting;
Expected
"Do you want to keep it?" message is shown in both cases.
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
Don't know
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered: