-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How To Store Pages As Trusted From Content Dialog C# uwp webview2 #3672
Comments
@jarno9981 you mean you are using UWP framework? May you also share Operating System version? |
Yes uwp framework , Windows 11 latest beta |
|
@jarno9981 Thanks. Do you have sample app you can share to reproduce the issue? |
Yes buts really big i can send it after i am home from work |
project is 450mb total it can throw .pri error can be ignored after building second time it dissepears drive link here : https://drive.google.com/file/d/1MWDc8Esf4XP68AJiTAfIB5bX-nXtBAn7/view?usp=sharing here are webview2 located Code Line = 252 t/m 278 Control located in = Core Folder My expected behaiver is when clicking proceed that you can store the site a trusted Windows 11 Pro, 22631.1972 |
navigate any localpage than this will appear |
@jarno9981 There is a ServerCertificateErrorDetected event you can use to intercept the error page, show the custom dialog and respond to continue/cancel the request. |
@monica-ch the method did not trigger anything not even safe it to secure or trusted |
@jarno9981 Can you check if it repros after deleting the WV2 user data folder? Also, I'm not able to access the project you shared in the google drive to test it locally |
I will test after deleting it and fixing google drive |
@monica-ch i fixed the link for the reproduce repo https://www.dropbox.com/scl/fi/u19sswfs3sxl8zlwfiifq/repo.zip?rlkey=l9zkqu9c24ot3f0369wq6c5qk&dl=1 using dropbox now |
@jarno9981 I see server certificate event gets fired upon subscribing to ServerCertificateErrorDetected in your app. Also, you must have to move your logic of showing the dialog in the server certificate event callback (not in the navigation completed) and get the deferral object and show the dialog in order to respond to the request. Example of using deferral in UWP apps https://github.com/MicrosoftEdge/WebView2Samples/blob/main/SampleApps/webview2_sample_uwp/Pages/Browser.xaml.cs#L71 Example of responding to server certificate error detected event. |
i made a costum dialog that ask to proceed or ask to not proceed make i want if i click proceed it adds the website to trusted website certificates but i tryed multible options but they didn't work
Webview2 : Latest Pre-Release
Uwp
i want to remove default and when clicking in costum that website certificate gets approved and so that unvalid will not trigger c#
C#
The text was updated successfully, but these errors were encountered: