为什么 WPF 如此不安全以至于它必须将其 Windows 标记为“非托管”?
我正在重写我的服务的前端,并且为了让我的安装程序更新注册表,它需要(对于 Vista 和 7 HP 用户)请求进行身份验证(如管理员权限)。
http://msdn.microsoft.com/en-us/library/ms748948.aspx 声明 WPF 的 Window 需要“UnmanagedCode 安全权限”。就安全提示而言,将前端从 Win Forms 更改为 WPF 有何影响?它真的比 Forms 灵活得多吗?它必须打破我刚刚接受的 .NET 和托管 Forms 的所有安全保证吗?
I'm re-writing the front end to my service and for my installer to update the registry it will require (for Vista and 7 HP users) a request to authenticate (like Administrator privilege).
http://msdn.microsoft.com/en-us/library/ms748948.aspx states that WPF's Window requires "UnmanagedCode security permission". What are the implications, in terms of security prompts, of changing the front end from Win Forms to WPF? Is it really that much more flexible than Forms that it has to break all the safety guarantees I have only just embraced with .NET and managed Forms?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这仅在受限信任(浏览器内应用程序,例如 ClickOnce 或 XBAP)中运行时才会出现问题。
此类应用程序无法自由创建弹出窗口;这可以防止网络钓鱼攻击。
正如 MSDN 明确指出的那样,这对于从本地计算机执行的应用程序来说不是问题。
它与管理权限无关。
This is only an issue when running in restricted trust (in-browser applications such a ClickOnce or XBAPs).
Such applications cannot freely create popup windows; this prevents phishing attacks.
As MSDN clearly states, this is not an issue for applications executed from the local machine.
It has nothing to do with administrative privileges.
继续阅读链接的文档:
只要应用程序作为本地应用程序启动,就不应该有任何提示。
Keep reading the linked docs:
As long as the app is launched as a local application, there shouldn't be any prompts.