none
Silverlight + WCF leads to Security error. Why?

    Question

  • Hi there

    In my Silverlight application I get the error:

    An error occurred while trying to make a request to URI 'https://mysite/Folder/WCFServices/MyService.svc'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place

    It has started taking place only after reconfiguring the IIS from Web site to Web Application. Before (with the Web side configuration) it worked Ok.

    I have deployed the clientaccesspolicy and crossdomain files to root, sub-root, whatever-root along with the WCFServices folder. No result.

    One more thing: if I call the WCF service from the server-side code (Index.aspx.cs, synchronously), it works Ok but when it comes to that call from within the Silverlight – it throws the exception shown above.

    Another thing: for Silverlight call the Fiddler shows 200 – no problems, but I noticed it switches the protocol to HTTP (it is declared in my web.config to use HTTPS).

    Why changing the IIS from Web-site configuration to Web Application crashes my calls?

    Thanks.
    Friday, September 21, 2018 6:07 PM