-
Notifications
You must be signed in to change notification settings - Fork 53
-
Star 441
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
我觉得我在使用webview2的过程中遇到了一个bug,关于在C盘中运行 代码或者执行编译好的应用程序 #3087
我觉得我在使用webview2的过程中遇到了一个bug,关于在C盘中运行 代码或者执行编译好的应用程序 #3087
Comments
victorthoang
commented
Dec 27, 2022
Hello @Naylor55, Thanks for your bug report. I've assigned this to a dev that can best try to replicate the issue and follow up on this. With holidays over and new year's approaching, I appreciate your patience! |
sln162
commented
Dec 27, 2022
•
edited
Loading
edited
@Naylor55 我不知道官方会不会认为是个BUG,但我知道怎么解决,只需要用显示初始化(EnsureCoreWebView2Async),并设置userDataFolder文件夹到一个不需要权限的位置。 |
Naylor55
commented
Dec 27, 2022
@victorthoang @sln162 感谢及时的回复和提供解决方案,我今天用另外一个方案解决了,程序启动的时候为xxx.WebView2文件夹追加Everyone的写入权限,您提供的这个方案我明天上班了会尝试。
|
Naylor55
commented
Dec 28, 2022
两种方法都可以解决 |
sln162
commented
Jan 2, 2023
@Naylor55 你的增加权限的解决方案很有趣,我也受到了启发。但如果增加Users用户的FullControl权限,会不会更合适点?创建文件夹的权限应该是AppendData权限,所以安全起见应该是FullControl权限,但Everyone是不是太偏激了,设置Users的FullControl权限是否也能满足要求? 我在增加这个方案作为备用方案,因为发现有些用户即使AppData文件夹也会出现奇怪的权限问题。 |
novac42
commented
Jan 5, 2023
@sln162 好问题,我记录下来跟技术团队讨论一下。同意把Everyone缩小到Users会更可控,我们也看看有没有更好的方案。- Good question, I'm gonna need to discuss with the dev team to see what an ideal solution would be and get back to you. |
sln162
commented
Jan 5, 2023
@novac42 谢谢回应,目前针对灾难性故障0x8000FFFF和拒绝访问0x80070005做了此处理,目前观察,大部分都在二次初始化完成,还有一部分执行完此方案仍然无法初始化,这部分可能不是权限问题。期待官方团队有更好的方案。- Thank you for your response. At present, this process has been done for catastrophic failure 0x8000FFFF and access denial 0x80070005. According to current observations, most of them are completed in the second initialization, and some of them still cannot be initialized after executing this solution. This part may not be a permission problem. Looking forward to the official team has a better plan. |
Naylor55
commented
Jan 29, 2023
对的,仅增加Users的权限确实是更好的方案,并且需要考虑当某些用户是以管理员身份登录的时候Users是否起作用。我提供的示例代码仅仅是为了表达这个处理思路。 |
minchen123
commented
Sep 14, 2024
使用 InnoSetup 打包,在C盘部署的话,增加E:\code\WPF\WebView2Bug.exe.WebView2权限的同时,也必须要给打的包赋予管理员权限才可以 |
Description
创建一个WPF的应用程序,引入webview2控件来显示网页,当代码放到E盘(E:\code\WPF\WebView2Bug)的时候应用程序启动后webview2控件成功显示了网页信息,但是当将代码文件放到C盘(C:\Program Files (x86)\WebView2Bug)中的时候,此时应用启动之后webview2控件显示空白,调试的时候,webview2.corewebview2对象为null
Version
我开发环境用的windows11,VS的版本为Microsoft Visual Studio Community 2022 (64 位) - Current
版本 17.4.1,webview2的版本为1.0.1418.22
Repro Steps
核心代码如下 :
xaml:
cs:
Screenshots
当代码在E盘(E:\code\WPF\WebView2Bug)中的时候,程序运行起来可以正常显示网页信息:
当点击 查看CoreWebView 按钮的时候,获取到其值不为null:
当代码在C盘(C:\Program Files (x86)\WebView2Bug)中 的时候,程序运行起来不可以显示网页信息:
当点击 查看CoreWebView 按钮的时候,获取到其值为null:
Additional context
复现和演示代码: https://github.com/Naylor55/WebVeiw2BugFeedback
当将编译好的wpf程序使用 InnoSetup 打包并安装到客户机 C盘的时候,Webview2 控件无法显示网页信息,当安装到客户机非C盘的时候,Webview2控件可以正常显示网页信息
The text was updated successfully, but these errors were encountered: