Skip to main content
Home Forums Silverlight Programming Programming with .NET - General SecurityException when calling WCF service
4 replies. Latest Post by chrisortman on October 13, 2008.
(0)
chrisortman
Member
0 points
4 Posts
10-09-2008 8:28 AM |
I am getting a SecurityException when calling a cross domain service from silverlight RC0
I have this in c:\inetpub\wwwroot\clientaccesspolicy.xml
<?xml version="1.0" encoding="utf-8"?><access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="*"> <domain uri="*"/> </allow-from> <grant-to> <resource path="/" include-subpaths="true"/> </grant-to> </policy> </cross-domain-access></access-policy>
And I verify using WebDevHelper that this file is requested and comes back with a 200 status
My services is hosted at /virtualroot/service.svc
Everything works fine if calling from the same domain.
I'm not even sure what else to check.
Edit: I have managed to figure out one more thing...This fails when I view my test page using file:///c:/code/project/bin/debug/testpage.html but does work if I start a web server and view the page over http
Is there a way around this? Being able to use file:/// for development purposes is very handy.
Thanks
amit_pal...
Participant
1150 points
201 Posts
10-09-2008 9:32 AM |
Thanks I refreshed the page and saw you have edited the post.
What you are trying to achieve is currently not possible. SL currently supports http>>https or vice versa however file>>http(s) or vice versa is not supported.
Please mark the post as 'Answered' if this Answers your question
10-09-2008 9:36 AM |
Bummer. Just to satisfy my curiosity do you happen to know why? I don't understand how the fact that the page was rendered from a file:/// source could impact the call to an http:// server Cheers
Yi-Lun L...
All-Star
25052 points
2,747 Posts
10-13-2008 4:21 AM |
Hello, this is by design. Full cross scheme is not supported. For example, file to http is not supported.
10-13-2008 8:31 AM |
I understand it is by design, my question is why design it this way.