EXE文件在Visual Studio中执行但Thrugh IIS [英] EXE file execute in Visual Studio but Thrugh IIS

查看:100
本文介绍了EXE文件在Visual Studio中执行但Thrugh IIS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Exe应用程序文件,我想在直接执行模式下通过互联网运行文件

I have an Exe application file and i want to run file over internet in direct execute mode

try
      {
          // Create An instance of the Process class responsible for starting the newly process.
          System.Diagnostics.Process process1 = new System.Diagnostics.Process();
          // Set the filename name of the file you want to execute/open
          process1.StartInfo.FileName = @"d:\Applications\\\\\.exe";
          process1.StartInfo.Arguments = "args";

          // Start the process without blocking the current thread
          process1.Start();
          // you may wait until finish that executable
          process1.WaitForExit();
          //or you can wait for a certain time interval
          //Thread.Sleep(20000);//Assume within 20 seconds it will finish processing.
          process1.Close();
      }
      catch (Exception ex)









这个过程在视觉工作室工作正常但是当我向iis添加项目时它不工作的文件没有打开没有发现错误.....我想知道那个iis允许执行exe文件或不执行......或任何其他想法通过互联网运行exe应用程序...请帮助...

提前感谢





This process works fine in visual studio but when i add project to iis its not working file not opening no error found ..... i want to know that iis allow to execute exe file or not......or any other idea to run exe application over internet ...pls help...
thanks in advance

推荐答案

1。您无法在客户端上运行该应用程序,这意味着您无法让某人浏览到您的站点并让该应用程序在其计算机上运行。这将是一个主要的安全风险。

2.做你正在做的事情会尝试在你的IIS服务器上运行exe。如果这是您想要的,那么您只需要向运行IIS应用程序池的用户授予适当的权限。
1. You can't run that app on the client, meaning you can't have someone browse to your site and have that app run on their machine. That would be a major security risk.
2. Doing what you are doing will try to run the exe on your IIS server. If that is what you want then you just need to grant the proper permissions to the user running the IIS Application Pool.


在IIS中运行的应用程序

运行时所谓的应用程序池标识。

这是默认设置。



因此,IIS中托管的应用程序无法访问您的应用程序文件夹。



请阅读:

http://www.iis.net/learn/manage/configuring-security/application-pool-identities [ ^ ]



如果你的应用程序池是DefaultAppPool

您必须为用户IIS AppPool \DefaultAppPool分配权限

才能访问您的应用程序文件夹。



此外:你要做的事情是危险的解决方案1已经告诉过你。
An application running in IIS
runs with a so-called Application-Pool Identity.
This is the default.

Therefore the application hosted in IIS cannot access your applications folder.

Please read:
http://www.iis.net/learn/manage/configuring-security/application-pool-identities[^]

If your application pool is "DefaultAppPool"
you must assign rights to user "IIS AppPool\DefaultAppPool"
to access your applications folder.

Besides: What you are trying to do is dangerous as solution 1 already told you.


这篇关于EXE文件在Visual Studio中执行但Thrugh IIS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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