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) 拒绝访问


基础教程推荐
- MS Visual Studio .NET 的替代品 2022-01-01
- rabbitmq 的 REST API 2022-01-01
- 如何激活MC67中的红灯 2022-01-01
- 为什么Flurl.Http DownloadFileAsync/Http客户端GetAsync需要 2022-09-30
- 将 Office 安装到 Windows 容器 (servercore:ltsc2019) 失败,错误代码为 17002 2022-01-01
- 如何在 IDE 中获取 Xamarin Studio C# 输出? 2022-01-01
- SSE 浮点算术是否可重现? 2022-01-01
- 有没有办法忽略 2GB 文件上传的 maxRequestLength 限制? 2022-01-01
- c# Math.Sqrt 实现 2022-01-01
- 将 XML 转换为通用列表 2022-01-01