2011-12-16 42 views
2

我在數據中心的服務器上承載Silverlight應用程序。我的客戶端位於Intranet上,他需要應用程序允許他連接到自己Intranet上的服務器。內部網絡上的Silverlight SecurityException,而不是外部的

客戶端的服務器也向公衆公開,我可以從我的機器(好的clientaccesspolicy.xml和所有爵士樂)中獲得Silverlight應用程序與他的服務器交談。但它不會爲他工作。 Silverlight應用程序在嘗試從Intranet後面訪問自己的服務器時會引發模糊的SecurityException。

如果你是一個視覺化的人,這裏的形勢很好圖:

Client can't access his own server with my Silverlight app

(綠色的連接是通過互聯網,紅色是失敗的內部網連接)

我們都使用相同的URI訪問服務器,並且他將我的Silverlight服務器和他的Intranet服務器都添加到了他的「可信站點」列表中。

的拋出:SecurityException看起來是這樣的:

System.Security.SecurityException ---> System.Security.SecurityException: [Arg_SecurityException] 
Arguments: 
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.0.61118.00&File=mscorlib.dll&Key=Arg_SecurityException 
    at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult) 
    at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassa.<EndGetResponse>b__9(Object sendState) 
    at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__1(Object sendState) 
    --- End of inner exception stack trace --- 
    at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state) 
    at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult) 
    at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result) 
    at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result) 

我在一個死衚衕。它看起來像是跨區域問題,但同樣,這兩個站點都位於相同的「可信站點」區域中。我錯過了什麼?

編輯: 還值得一提的是,他用小提琴來診斷問題。有趣的是,他的機器不檢查clientaccesspolicy.xml文件,甚至從未嘗試與服務器通信。

+0

你在相關服務器上有`clientaccesspolicy.xml`或`crossdomain.xml`文件嗎? – ChrisF 2011-12-16 16:13:12

回答

1

事實證明,客戶端實際上在本地Intranet區域有自己的服務器,而我的服務器在可信區域。他將我的服務器移動到本地Intranet區域,並開始工作。