Silverlight安全例外

时间:2015-04-03 19:38:27

标签: security silverlight

我在Visual Studio 2013下的Windows 8.1中运行Silverlight应用程序时出现以下错误。

    Stack Trace:
   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__0(Object sendState)

我使用以下内容创建了一个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>

我需要添加更多设置,以免出现安全错误。

1 个答案:

答案 0 :(得分:0)

我发现我没有将clientaccesspolicy.xml文件放在正确的文件夹中,而是导致错误。