IIS配置的ASP.net网站,不能打开本地的exe文件,直接在visual studio上运行正常
我用visual studio 2010 写了一个网站,在Page_Load时,用下面的方式打开一个本地的exe文件
System.Diagnostics.Process process = new System.Diagnostics.Process();
process.StartInfo.FileNmae = "C:\\a.exe";
process.StartInfo.CreateNoWindow = true;
process.Start();
直接在vs上运行的时候没问题。
当我配置到IIS6.0上以后,运行网页,发现a.exe的程序进程能在任务管理器中发现,但是只是一个进程,a.exe的功能却没有了。
希望哪位大神能给解决了,不会这个。谢谢。 IIS ASP.NET IIS中ASP.NET运行本地exe程序
[解决办法]
你把IIS服务的登录用户名改为Administrator再试试?
In addition to setting this registry key, the service application must be marked as "interactive". This allows your service to interact with the desktop, and allows the debugger window to appear on your desktop.
This again requires modifying a registry key: you must bitwise-or the type entry for your service with 0x100 (this is the value for SERVICE_INTERACTIVE_PROCESS according to Winnt.h). The exact location and name of this registry entry varies. For example:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MyServiceKey
[解决办法]