我的asp.net应用程序可以调用Linux服务器,尤其是一些shell脚本吗? [英] Can my asp.net application make a call to a linux server, speficially some shell script?

查看:51
本文介绍了我的asp.net应用程序可以调用Linux服务器,尤其是一些shell脚本吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在Windows框上有一个asp.net Web应用程序(很明显!),并且我需要执行Linux服务器上的Shell脚本,那有可能吗?

If I have a asp.net web app on a windows box (obviously!), and I need to execute a shell script that is on a linux server, is that possible?

我如何安全地做到这一点?

How can I do this safely?

推荐答案

例如,要基于cxfx所说的内容,最好的选择是在linux机器上设置一个Web服务器,并使用例如构建Web服务.,PHP.

To build on what cxfx has said above your best bet might be to set up a web server on the linux box, and build a web service using, for example, php.

php允许您运行Shell脚本-因此,通过调用网页runscript.php,然后使用exec(

php allows you to run shell scripts - so by calling a web page runscript.php and then using exec (http://php.net/manual/en/function.exec.php) you could run the script.

安全性是一个考虑因素-您可以仅将Linux Web服务器的访问权限限制为承载asp.net站点的服务器的IP地址吗?

Security is a consideration - you could restrict access to the linux web server purely to the IP address of the server hosting your asp.net site?

希望有帮助.

这篇关于我的asp.net应用程序可以调用Linux服务器,尤其是一些shell脚本吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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