我讀過很多文章。但據我所知,我所做的一切。 在本地計算機上VS2010一切正常。只有在IIS7服務器上工作時纔會出現此問題。IIS7無法通過進程啓動我的Exe文件
如果我從Windows資源管理器手動啓動它,我想啓動一個在服務器上很好的exe文件。
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
我已經轉換目錄ClientBin
在IIS中的應用。
但使用該服務時,我收到此錯誤(在Silverlight應用回調):
{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
<?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>
仍然是一樣的信息。 有什麼想法?
*新的信息 - 動詞* 使用此功能時
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)
我得到這個結果:
動詞=,,, ,,,,,
*發現的解決方案* 我已經找到了解決方案,同時使用,同時使用的x86應用程序在x64組合IIS與verb=runas
標誌http://www.fiddler2.com和http://technet.microsoft.com/en-us/sysinternals/bb896653 問題。現在應用程序被設置爲anycpu(也許這沒有關係)並且ProcessStartInfo上的verb
未設置爲任何值。
謝謝你很多邁克爾。這聽起來像它應該工作。我感到很蠢,但我不知道在哪裏找到你正在談論的'FullControl'標誌。我添加了一張圖片。請你能嘗試給我提供一些菜單的細節來找到'FullControl'嗎? – Nasenbaer
@Nasenbaer:轉到資源管理器中的實際文件夾,而不是在IIS管理器中。讓我知道你是否需要截圖。 – MichaelS
嗨MichaelS。再次感謝。在我在Stackoverflow中發佈之前,我已經檢查過這個問題。但是因爲我在IIS用戶上看到所有內容都是「完全訪問」,所以我無法解決問題。請,是的,你能否在Windows資源管理器中提供我的菜單(英文應該沒問題)?我添加了一張新照片來顯示我查看的位置。 – Nasenbaer