我正在從silverlight調用本地託管的wcf服務,我在下面得到了例外。從Silverlight調用WCF服務
我創建了一個clientaccesspolicy.xml,它位於我的主機的路由中。
<?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>
錯誤,而試圖讓 到URI 'http://localhost:8005/Service1.svc' 請求時發生。 這可能是由於跨域 配置錯誤。有關更多詳細信息,請參閱 內部例外。 --->
{System.Security.SecurityException ---> System.Security.SecurityException: 安全錯誤。在在 System.Net.AsyncHelper MS.Internal.InternalWebRequest.Send() 在 System.Net.BrowserHttpWebRequest.BeginGetResponseImplementation() 在 System.Net.BrowserHttpWebRequest.InternalBeginGetResponse(的AsyncCallback 回調,對象狀態)。 <> c__DisplayClass4.b__3(對象sendState)---內 異常堆棧跟蹤的末尾在 System.Net.AsyncHelper.BeginOnUI(BeginMethod beginMethod,AsyncCallback的回調, 對象狀態)在 System.Net.BrowserHttpWebRequest .BeginGetResponse(的AsyncCallback 回調,對象狀態)在 System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteSend在 System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.OnSend(IAsyncResult的 結果)(IAsyncResult的 結果) }
關於如何進步的任何想法?