Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)(在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 拒绝访问)
问题描述
我正在尝试上传文件并将其转换为另一种格式,然后再将它们保存到我的网络服务器上,但出现以下错误:System.ComponentModel.Win32Exception (0x80004005):访问在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 在 System.Diagnostics.Process.Start() 被拒绝
I am trying to upload files and convert them to another format before saving them on my web server, but I get the following error: System.ComponentModel.Win32Exception (0x80004005): Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) at System.Diagnostics.Process.Start()
当我尝试在本地计算机的网络服务器 (Windows 7) 上执行此操作时没有问题,但是在将我的网站部署到具有 Windows Server 2008 R2 的网络托管服务提供商后,我收到了此错误.
There was no problem when I tried to do this on my local machine's web server (Windows 7), but I am getting this error after deploying my website to my web hosting provider, which has Windows Server 2008 R2.
我正在使用 ASP.NET c#.我猜这是权限问题,但我不确定如何提升任何权限.请帮忙!
I am using ASP.NET c#. I'm guessing it's a permissions issue, but I'm not sure how to elevate any permissions. Please help!
推荐答案
我怀疑您是否可以将执行程序的权限授予标准 ASPNET 用户(这也是不好的做法).更好的选择(不启动进程)是将应用程序池的用户更改为服务器上有权执行进程的本地用户(最好是非管理员帐户).请注意,您启动的进程不能有任何 UI 组件,因为您不会看到它在运行.
I doubt you can give permissions to execute programs to the standard ASPNET user (and it would be bad practice as well). A better option (short of not starting a process) would be to change the user of the Application Pool to a local user on the server that has permissions to execute the process (preferable a non-admin account). Be aware that the process you start can't have any UI components since you won't see it running.
这篇关于在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 拒绝访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo) 拒绝访问


- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- C# 中多线程网络服务器的模式 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- 输入按键事件处理程序 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01