在iis7上运行可执行文件
我正在尝试从 iis7 内部运行可执行文件。可执行文件是我创建的控制台应用程序,我正在尝试使用 Process.Start() 运行它。 该进程在后台运行(我在进程列表中看到它),但没有控制台窗口。
我怎样才能让它在控制台窗口中运行?
我已经尝试过iis管理服务选项中的“允许桌面交互”。没用。
I'm trying to run an executable from inside iis7. The executable is a console application i created and i'm trying to run it with Process.Start().
The process runs on the background (i see it on the process list) but without the console window.
How can i make it run with the console window ?
I already tried the "allow desktop interaction" in the iis admin service options. Didn't work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您真正想要做的是跟踪 Web 应用程序的行为,那么尝试写入控制台窗口并不是正确的方法。
答案在这里进一步阐述:在 IIS 上用 C# 输出到控制台< /a>
编辑:
也许您应该考虑将控制台应用程序逻辑移植到
ServicedComponent
并使用 COM+ 注册它。这将允许您在执行组件逻辑的上下文方面有一定程度的自由度。If what you really want to do is to trace the behavor of your web application, then attempting to write to a console window is NOT the right approach.
The answer is further elaborated here: Outputting to the Console in C# on IIS
EDIT:
Maybe you should consider porting your console application logic to a
ServicedComponent
and register it with COM+. That will allow you some degrees of freedom with respect to the context in which the component logic is being executed.