通过Web应用程序启动服务器端控制台应用程序 [英] Initiating a Server Side Console Application through a Web App

查看:252
本文介绍了通过Web应用程序启动服务器端控制台应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 wkhtmltopdf 将网页转换为pdf.现在,我正在使用计划任务来执行控制台应用程序,但是我希望能够按需运行它. .Net中是否可以通过Web应用程序运行控制台应用程序.我不需要与之交互,只需对其进行初始化.

I''m using wkhtmltopdf to convert a web page to pdf. Right now I am using a scheduled task to execute the console application, but I would like to be able to run it on demand. Is there a way in .Net to run a console app through the web app. I don''t need to interact with it, just initialize it.

推荐答案

尝试System.Diagnostics.Process.Start()

在此处了解更多信息< a href ="http://msdn.microsoft.com/en-us/library/e8zac0ca.aspx"> http://msdn.microsoft.com/en-us/library/e8zac0ca.aspx< ;/a> [< a href ="http://msdn.microsoft.com/zh-cn/library/e8zac0ca.aspx" target ="_ blank" title ="New Window"> ^</a> ]


*如果可以解决您的问题,请标记为答案
Try System.Diagnostics.Process.Start()

Read more here <a href="http://msdn.microsoft.com/en-us/library/e8zac0ca.aspx">http://msdn.microsoft.com/en-us/library/e8zac0ca.aspx</a>[<a href="http://msdn.microsoft.com/en-us/library/e8zac0ca.aspx" target="_blank" title="New Window">^</a>]


*Mark as answer if this solves your problem


这篇关于通过Web应用程序启动服务器端控制台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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