gpt4 book ai didi

c# - 系统.ComponentModel.Win32Exception : Access is denied

转载 作者:太空宇宙 更新时间:2023-11-03 16:49:25 25 4
gpt4 key购买 nike

我正在开发基于 C# Windows 的应用程序。我得到了

System.ComponentModel.Win32Exception: Access is denied

在我安装的应用程序中。

2011-01-05 12:41:42,916, ERROR, RINXUI.main, System.ComponentModel.Win32Exception: Access is denied
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()

只有在安装应用程序时才会出现此错误。当我尝试从 Visual Studio 调试我的应用程序时,没有出现异常。

我已经使用 IzPack 安装程序实用程序安装了应用程序并将其安装在桌面上(用于测试目的)。

有人知道为什么这个异常只发生在安装版本中吗?

最佳答案

堆栈跟踪中的 System.Diagnostics.Process.Start() 怎么样 - 您是否正在尝试从您的应用程序启动任何进程。如果是,那么您需要查看运行您的应用程序的 a/c 是否具有足够的权限来读取/写入可执行文件的存储位置。

关于c# - 系统.ComponentModel.Win32Exception : Access is denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4601737/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com