wcf iis host 打开exe失败 不能显示界面
最近谷歌没法用了,我的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添加应用池权限,
需要注入添加账户的时候必须输入完整的 IIS AppPool\DefaultAppPool,才能正常添加
打开的进程在后台中显示,打开的用户是DefaultAppPool
第二种方法
What helped me is this: Setting in Application Pool Identity = LocalSystem
- Open Application Pools
- Find your pool (by default DefaultAppPool)
- Click on "Advanced settings"
- Change Identity to "LocalSystem"
Hopefully it will help somebody...
能够打开exe进程的,但是不会显示界面
http://stackoverflow.com/questions/7209505/how-to-start-a-process-from-an-iis-hosted-wcf-service
Oleksii, the point is that if you host the WCF service in a console application, there is a windows session (a user logged in and Windows Explorer loaded) for that user and the notepad is opened and shown for that user, so you see it in the UI.
when you host your WCF service in IIS, being a server, IIS requires and allows no user interaction and works also if no user is logged in; in that context there is no UI to host your notepad or other UI enabled applications, you could execute a process for elaboration or other batch jobs but not render a windows UI application, because Windows Explorer is not loaded for you and there is no place to render your process's UI.
http://codeblow.com/questions/steps-to-start-a-procedure-from-an/
作者:Chuck Lu GitHub |
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了