我正在从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的 结果) }
关于如何进步的任何想法?