IIS7无法启动我的exe文件被处理开始 [英] IIS7 does not start my Exe file by Process Start

查看:999
本文介绍了IIS7无法启动我的exe文件被处理开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读了很多文章。但据我所知,我所做的一切。 在本地计算机上VS2010一切工作正常。只有IIS7服务器上工作时,将出现问题。

I've read a lot of articles. But as far as I know I've done all. On local computer VS2010 all works fine. The problem occurs only when working on IIS7 Server.

我要开始一个exe文件至极的伟大工程,在服务器上,如果我从Windows资源管理器手动启动它。

I want to start a exe file wich works great on server if I start it manually from Windows Explorer.

 Dim fiExe As New IO.FileInfo(IO.Path.Combine(diBase.FullName, "ClientBin\ConvertAudio.exe"))
    Dim SI As New ProcessStartInfo(fiExe.FullName, args)
    SI.Verb = "runas"
    SI.UseShellExecute = True
    SI.WorkingDirectory = fiExe.Directory.FullName
    Dim P As Process = Process.Start(SI)
    P.PriorityClass = ProcessPriorityClass.Idle

我已经转换在IIS应用程序的目录的ClientBin

但是用我收到此错误的服务(回调在Silverlight应用程序)时:

But when using the service I receive this error (callback in Silverlight application):

{System.Security.SecurityException ---> System.Security.SecurityException: Sicherheitsfehler
   bei System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
   bei System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClass5.<EndGetResponse>b__4(Object sendState)
   bei System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__0(Object sendState)
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   bei System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   bei System.Net.WebClient.WebClientWriteStream.<Dispose>b__3(IAsyncResult ar)}

我试图存储文件clientaccesspolicy.xml的 像的ClientBin

I've tried to store the file "clientaccesspolicy.xml" in same directory like ClientBin

<?xml version="1.0" encoding="utf-8"?>
<access-policy>
    <cross-domain-access>
        <policy>
            <allow-from http-request-headers="*">
                <domain uri="*"/>
            </allow-from>
            <grant-to>
                <resource path="/" include-subpaths="true"/>
            </grant-to>
        </policy>
    </cross-domain-access>
</access-policy> 

不过同样的信息。 你知道吗?

Still the same message. Any idea?

*新的信息 - 动词* 使用此功能时

Dim startInfo As New ProcessStartInfo(fiExe.FullName)
            Dim V As String = ""
            For Each verb As String In startInfo.Verbs
                V &= V & ", "
            Next
            Throw New Exception("Verbs=" & V)

我得到这个结果:

I receive this result:

动词=,,,,,,,

*解*中找到 我一直在使用 http://www.fiddler2.com 和的 http://technet.microsoft.com/en-us/sysinternals/bb896653 问题是,当结合使用x86的应用在x64 IIS与动词=运行方式标志。现在,应用程序设置为值为anycpu(也许这并不重要)和动词上的ProcessStartInfo没有设置任何东西。

* Solution found * I've found the solution while using http://www.fiddler2.com and http://technet.microsoft.com/en-us/sysinternals/bb896653 Problem was while using x86 application on a x64 IIS in combination with verb=runas flag. Now application is set to anycpu (Perhaps that does not matter) and verb on ProcessStartInfo is not set to anything.

推荐答案

修改

在一个漫长的旅程,我和 Nasenbaer 发现以下。 可能的原因IIS失败运行EXE是:

After a long journey, me and Nasenbaer have found the following. The possible reasons for IIS to fail run an EXE are:

  1. 缺少的IIS用户,如应用程序池的用户,或者网络服务(在IIS6)的权限。
  2. 在64位机器上运行的问题86 EXE。
  3. 在典型的EXE失败的问题,如缺少的依赖关系。

原来的答复:

Original answer:

您需要分配FullControl安全权限为 IIS程序池\默认应用用户,在EXE所在的目录。这是试图运行的用户过程(假设你使用的是默认应用),并且没有适当的权限,这是无法做到的。

You need to assign FullControl security permissions for the IIS AppPool\DefaultAppPool user, on the directory the EXE is located in. This is the user that is trying to run the process (assuming you are using the DefaultAppPool), and without the proper permissions, it is unable to do so.

当你手动运行的EXE,您使用的是Windows登录的用户。这就是为什么你可以吃午饭它manualy。在IIS使用应用程序池的用户。

When you run the EXE manually, you are using the Windows logged in user. This is why you are able to lunch it manualy. The IIS uses the Application Pool user.

要添加的权限只是做了以下内容:

  1. 进入目录的属性
  2. 安全标签
  3. 编辑.. - >添加 IIS程序池\默认应用
  4. 检查它的 FullControl
  1. Go to directory properties
  2. Security tab
  3. Edit.. -> Add the IIS AppPool\DefaultAppPool
  4. Check for it the FullControl

截图

这篇关于IIS7无法启动我的exe文件被处理开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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