2012-05-02 40 views
4

我有Silverlight應用程序,我得到這個錯誤:的Silverlight:WCF得到錯誤的服務器,但本地主機工作正常

[Async_ExceptionOccurred] 
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=System.dll&Key=Async_ExceptionOccurred INNER >System.ServiceModel.CommunicationException: [CrossDomainError] 
Arguments: http://localhost/pthaba/SimpleWCF.svc 
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=System.ServiceModel.dll&Key=CrossDomainError ---> 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 

我有一個WCF服務,並在瀏覽器中正常工作。 我有一個像下面的根站點(位於WCF服務)clientacesspolicy.xml

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

    </cross-domain-access> 
</access-policy> 

什麼,我做錯了什麼? 任何人都可以幫助嗎?

編輯:

在我的本地工作正常,但在服務器上沒有。 提琴手似乎沒問題,沒有錯誤。

我錯過了一些IIS配置?

更多錯誤的詳細信息上面:

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.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result) 
    --- End of inner exception stack trace --- 
    at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result) 
    at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result) 
    at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) 
    at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result) 
    at Pthaba.SimpleSVC.SimpleWCFClient.SimpleWCFClientChannel.EndGetGameLevelPlataforms(IAsyncResult result) 
    at Pthaba.SimpleSVC.SimpleWCFClient.Pthaba.SimpleSVC.ISimpleWCF.EndGetGameLevelPlataforms(IAsyncResult result) 
    at Pthaba.SimpleSVC.SimpleWCFClient.OnEndGetGameLevelPlataforms(IAsyncResult result) 
    at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result) 
ult) 
+0

哪裏是你的策略文件在什麼位置? – Stainedart

+0

我經常用小提琴來檢查這種問題。你應該看到ClientacessPolicy.xml的請求,如果路徑是正確的,等等。http://www.fiddler2.com/fiddler2/ – Leo

+0

嗨, 策略文件位於root suck像我的service.svc –

回答

相關問題