Recently I faced the dreaded System.Security.SecurityException: Security Error.. while developing the SL4 application consuming the WCF REST service. After a lot of trials fixed this dreaded issue. So thought of sharing my experince on SL4 consuming WCF REST service.
1) Ensure that crossdomain.xml and clientaccesspolicy.xml files are available in C:\Inetpub\wwwroot folder.
2) If you are using HTTPS, ensure the following;
- Ensure clientaccesspolicy.xml contains explicit <domain uri="https://*"></domain>
- Ensure only SSL access is enabled. The SL app and WCF REST service should not be accessible in HTTP mode.
- Ensure crossdomain.xml contains <site-control permitted-cross-domain-policies="master-only"/> <allow-access-from domain="*" />
Do IISRESET. Then you should be able to get rid of this dreaded error.
No comments:
Post a Comment