【问题标题】:Silverlight Security exceptionSilverlight 安全异常
【发布时间】:2015-04-03 19:38:27
【问题描述】:

当我在 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>

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

【问题讨论】:

  • 请您将代码添加到您的问题中吗?

标签: security silverlight


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2012-01-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-16
    • 1970-01-01
    • 2010-12-02
    • 2016-11-20
    相关资源
    最近更新 更多