Silverlight:WCF在服务器上出错,但本地主机正常

Joã*_*nço 5 silverlight wcf iis-7 silverlight-4.0

我有silverlight应用程序,并且出现此错误:

[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
Run Code Online (Sandbox Code Playgroud)

我有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>
Run Code Online (Sandbox Code Playgroud)

我做错了什么?有谁能够帮助我?

编辑:

在我的本地主机上工作正常,但在服务器上却没有。提琴手似乎还可以,对此没有任何错误。

我是否缺少某些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)
Run Code Online (Sandbox Code Playgroud)

mse*_*dio 2

我遇到了同样的问题,并按照这篇文章开始工作:使服务跨域边界可用

我必须做出如下更改,有人在那篇文章的底部评论道:

<allow-from http-request-headers="*">
Run Code Online (Sandbox Code Playgroud)