Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/linq/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Silverlight WebClient.DownloadStringAsync()仅在浏览器外工作_Silverlight_Get_Webclient_Silverlight 5.0 - Fatal编程技术网

Silverlight WebClient.DownloadStringAsync()仅在浏览器外工作

Silverlight WebClient.DownloadStringAsync()仅在浏览器外工作,silverlight,get,webclient,silverlight-5.0,Silverlight,Get,Webclient,Silverlight 5.0,我的Silverlight 5应用程序使用WebClient上传和下载json内容。POST请求工作正常,但GET请求仅在浏览器外的上下文中工作 这是我的服务器的clientaccesspolicy.xml <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="*" http-methods="*"&

我的Silverlight 5应用程序使用WebClient上传和下载json内容。POST请求工作正常,但GET请求仅在浏览器外的上下文中工作

这是我的服务器的clientaccesspolicy.xml

<access-policy>
    <cross-domain-access>
        <policy>
            <allow-from http-request-headers="*" http-methods="*">
                <domain uri="*"/>
            </allow-from>
            <grant-to>
                <resource include-subpaths="true" path="/"/>
            </grant-to>
        </policy>
    </cross-domain-access>
</access-policy>

有人知道如何使GET请求在浏览器上下文中工作吗


谢谢

“不工作”是什么意思?你有例外吗?还有,你的请求设置了一些特殊的标题吗?