调用Web服务使用的应用程序 [英] Invoke an application using webservice

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

问题描述

我想在我的服务器Windows Server2008中编写一个Web服务调用我的服务器上的一些应用程序。我的用户的System.Diagnostics.Process类调用exe文件。它适用于服务器本身很好,但是当我使用Web服务在不同的PC,我这是指定的文件未找到错误消息。但是,当我刚启动cmd.exe正常工作了。据我了解我访问服务器,我可以至少运行在cmd.exe的。但是,当涉及到调用不同的exe它是行不通的。我有另一条线索太多,当我远程运行cmd.exe的运行,我试图杀死它远程那么它给我的错误拒绝访问。

I'm trying to write a web service on my server windows server2008 to invoke some applications on my server. I user system.diagnostics.process class to invoke exe files. It works fine on server itself, but when i use the webservice over a different pc, I got error message which is specified file not found. But when I just launch cmd.exe it works fine too. As far as i understand I have access to server which i can run at least cmd.exe on. But when it comes to invoke different exe's it just doesn't work. I have another clue too, when I run the cmd.exe remotely it runs, and I try to kill it remotely then it gives me the error "Access denied".

我不熟悉这种服务器访问权限的工作。因此,我需要一些帮助。
任何帮助将是AP preciated:)

I'm not familiar with this kind of server access,permission jobs. Hence I need some help. Any help would be appreciated :)

推荐答案

您需要确保该应用程序池在IIS中运行作为有权限执行该服务器上的可执行文件的用户。

You need to make sure that the Application Pool in IIS in running as a user that has permission to execute the executables on that server.

警告(你可能知道)只是一个字:这是,如果你公开这些服务到任何地方巨大的安全隐患。打开一个服务运行的应用程序是有风险的,所以我会确保有没有其他办法可以做到你想做到什么。

Just a word of warning (as you may know): this is a huge security risk if you expose these services out to anywhere. Opening up a service to run an application can be risky so I would make sure that there's no other way to do what you're trying to accomplish.

这篇关于调用Web服务使用的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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