When creating a WCF Service Application for your Silverlight application you will encounter a "cross domain" error with default configurations.
Below I show the default Service application code (only class name changed) and made the necessary Silverlight WCF configuration change for basicHttpBinding as shown by the arrow.
I then created a Web Service reference for both my Silverlight application and Test application. Note that Silverlight uses Async calls while the Test project uses Sync call to obtain data.
When I run the Silverlight application I get the following error:
I added the following clientaccesspolicy.xml file per (you can copy code from it) to my WCF Service and both my Silverlight and Unit test run without issue.
因篇幅问题不能全部显示,请点此查看更多更全内容
Copyright © 2019- igat.cn 版权所有 赣ICP备2024042791号-1
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务