最近谷歌没法用了,我的freegate经常性的崩溃
无奈之下,用了必应,貌似也不错
http://stackoverflow.com/questions/8414514/iis7-does-not-start-my-exe-file-by-process-start
Edit:
After a long journey, me and Nasenbaer have found the following. The possible reasons for IIS to fail run an EXE are:
- Lack of permissions for IIS Users, such as the application pool user, or the Network service (in IIS6).
- x86 EXE running on x64 machine issues.
- Typical EXE failure issues such as missing dependencies.
Original answer:
You need to assign FullControl security permissions for the IIS AppPool\DefaultAppPool
user, on the directory the EXE is located in. This is the user that is trying to run the process (assuming you are using the DefaultAppPool
), and without the proper permissions, it is unable to do so.
When you run the EXE manually, you are using the Windows logged in user. This is why you are able to lunch it manualy. The IIS uses the Application Pool user.
To add permissions just do the following:
- Go to directory properties
- Security tab
- Edit.. -> Add the
IIS AppPool\DefaultAppPool
- Check for it the
FullControl
首先,提供了一般情况下无法打开exe的原因
如果其他方式可以打开,只有在wcf iis host中无法打开,那么就是权限的问题
一般情况下,我们打开exe使用的是windows登录的账户,但是iis是通过应用程序池去打开的
默认情况下,应用程序池是没有打开exe的权限的,所以需要给指定的exe添加权限,我偷懒,直接添加了everyone的权限