主程序SilverLight登陆同时登陆另一个mvc程序,
调试模式下,localhost访问192.168.100.16:802,登陆正常,
SilverLight发布到iis : 192.168.100.16:801
mvc程序发布到iis:192.168.100.16:802
通过 192.168.100.16:801访问192.168.100.16:802就报异常安全性错误
异常处代码:
WebRequest request = asyncResult.AsyncState as WebRequest;
WebResponse response = request.EndGetResponse(asyncResult);
尝试解决(未解决):
在mvc程序中添加跨域访问
<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="">
<domain uri=""/>
</allow-from>
<grant-to>
<socket-resource port="90-4534" protocol="tcp" />
<resource path="/" include-subpaths="true"/>
</grant-to>
</policy>
</cross-domain-access>
</access-policy>
详细报错信息:
System.Security.SecurityException:安全性错误。
位于
System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncRes ult asyncResult)
位于
System.Net.Browser.BrowserHttpWebRequest.<>c_DisplayClassa.<EndGetRespo nse>b_9(Object sendState)
位于
System.Net.Browser.AsyncHelper.<>c_Displayclass4.<BeginOnUl>b_0(Object sendState)