需要从ASP.net执行服务器的* .exe [英] Need to execute *.exe in server from ASP.net

查看:117
本文介绍了需要从ASP.net执行服务器的* .exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在的情况是,我需要执行一个exe(这将创建一个本地.txt文件)在远程服务器IIS托管的ASP.net/C# API。我创建了一个本地用户(比如用户A)作为管理员运行在远程服务器上的Web服务,但没有创建.txt文件。我已经检查并给予必要的文件夹权限和用户A在各组中添加的用户。有趣的是,如果我在远程系统登录的用户A,如预期的那样exe文件被执行。如果我注销,然后失败。服务器是服务器赢得2008年IIS 7的任何帮助将是AP preciated感谢。

My current situation is that I need to execute an exe(which creates a local .txt file) in remote server with IIS hosting an ASP.net/C# API. I created a local user(say userA) as admin to run the web service in the remote server but the .txt file was not created. I already checked and granted necessary folder permissions to userA and added the user in various groups. The funny thing is that if i am logged in as userA in the remote system, the exe gets executed as expected. If i log out then it fails. Server is Win server 2008 with IIS 7. Any help would be appreciated thanks.

更新:我已经解决了这个问题,并公布答案和一些链接在这里SO有关的问题。总之,我需要设置在IIS应用程序池'负载的用户配置文件真。

UPDATE: I've solved the issue and posted the answer and a few links to related issues here on SO. In short, I needed to set 'load user profile' true in IIS app pool.

谢谢大家对他们的贡献

推荐答案

更​​新:我管理的许多个星期后,解决问题。感谢大家的贡献。显然,IIS默认不加载Windows用户配置文件。这样谁没有登录不同的用户运行时,他们的Windows配置文件,必须由IIS加载。在您的应用程序池的高级设置菜单中,有一个选项负载门窗型材我只是改变了这一为true。在IIS以前的版本中,这是默认设置为真。

UPDATE: I managed to solve the issue after many weeks. Thank you all for your contribution. Apparently IIS does not load windows user profiles by default. So when running as a different user who is not logged on, their windows profile must be loaded by IIS. In advanced setting menu of your app pool, there is an option "load windows profile" I just changed this to true. In prior versions of IIS, this was set to 'true' by default.

在SO相关问题有相同的解决方案:

Related questions on SO with same solution:

1)<一href=\"http://stackoverflow.com/questions/3068548/security-exceptions-in-asp-net-and-load-user-profile-option-in-iis-7-5\">Security在ASP.NET异常和加载用户配置文件选项在IIS 7.5

2)<一href=\"http://stackoverflow.com/questions/697429/running-a-asp-net-web-application-project-on-iis7-throws-exception\">Running在IIS7一个asp.net web应用程序项目抛出异常

3)<一个href=\"http://stackoverflow.com/questions/2242039/system-web-aspnethostingpermission-exception-on-new-deployment\">System.Web.AspNetHostingPermission在新的部署异常

另一个
4)<一个href=\"http://geekswithblogs.net/ProjectLawson/archive/2009/05/05/iis-system.web.aspnethostingpermission-exception-on-windows-7-rc.aspx\" rel=\"nofollow\">http://geekswithblogs.net/ProjectLawson/archive/2009/05/05/iis-system.web.aspnethostingpermission-exception-on-windows-7-rc.aspx

这篇关于需要从ASP.net执行服务器的* .exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆