Allow Silverlight application access to API
Allow Silverlight client applications access through the deployment on your server of a Silverlight policy file. Read more here: http://msdn.microsoft.com/en-us/libra...
1
person likes this idea
I like this idea!
Tell me when this idea gets some attention.
The more people who like this idea, the more it gets noticed.
The more people who like this idea, the more it gets noticed.
-
Inappropriate?Laurent,
What problem does the lack of this file cause? Is it not possible to disable this requirement in your Silverlight API client configuration? Most other clients of RESTful APIs such as Tracker's do not require any special access file.
Could you provide an example file, and the path at which you would like it to be served?
-
Inappropriate?Chad,
Silverlight 2 and later includes support for cross-domain connectivity which allows an application to access resources from locations other than the site of origin. This is an important feature for enabling Silverlight applications to consume existing services on the web. The security policy system in the Silverlight runtime requires that a policy file be downloaded from a target domain before a network connection is allowed access to a network resource under that target domain.
Silverlight supports two types of security policy files:
Flash policy file - the existing crossdomain.xml policy file used by Adobe Flash. This policy file can only be used by the WebClient and HTTP classes in the System.Net namespace. A Flash policy file must allow access to all domains to be used by the Silverlight runtime.
Silverlight policy file - the Silverlight policy file that can be used by the WebClient and HTTP classes in the System.Net namespace and also by the sockets classes in the System.Net.Sockets namespace. This policy file has a different format than the Flash policy file.
Without that file I can't have my Silverlight client (same for flash) make a call to your api !
There is example of such a file on this page:
http://msdn.microsoft.com/en-us/libra...
example file, e.g.
<?xml version="1.0" encoding="utf-8"?>
<!--Enables Silverlight 3 all methods functionality-->
<!--Enables Silverlight 2 clients to continue to work normally -->
the path :
The Silverlight runtime first tries to download a Silverlight policy file with a name of "clientaccesspolicy.xml" at the root of the requested target domain using the HTTP protocol.
If the "clientaccesspolicy.xml" is either not found (the web request returns a 404 status code), returned with an unexpected mime-type, is not valid XML, or has an invalid root node, then the Silverlight runtime will issue a request for a for the Flash policy file with a name of "crossdomain.xml" at the root of the requested target domain, using the HTTP protocol.
HTTP redirects for the policy file are not allowed. A redirect for a policy file will result in a SecurityException of access denied.
If a "clientaccesspolicy.xml" file is returned, but contains an error other than the ones listed above, then no further cross domain requests to that domain will be allowed.
If a valid "clientaccesspolicy.xml" file is returned, that file will be used as the policy file for that cross-domain request for the remainder of the client session of the Silverlight application, and will be used to determine the validity of all subsequent cross-domain requests to that domain.
The Flash policy file must allow connections to all domains for it to be used by the Silverlight WebClient and HTTP classes.
I’m happy
-
Inappropriate?Chad,
Example file was removed from my post, please have a look to the link. I copied the file from this page.
Thanks for your support!
I’m happy
-
Inappropriate?Hi Laurent,
There are a lot of examples on that page, I'm not sure which one to use.
If you can post the exact file contents and filename/path which would be required for Silverlight to work with the Tracker API, we can look into hosting it.
GetSatisfaction might let you post the file contents inside a 'pre' tag (I'll try it here). If not, you can email it to tracker@pivotallabs.com.
testing, this should be preformatted text
-
Inappropriate?Hi Chad,
Thanks for your fast answer!
This policy file accepts connections from any domain. This policy file allows request headers and specifies resources that can be accessed and includes subpaths of these resources.
clientaccesspolicy.xml
<?xml version="1.0" encoding="utf-8"?>
Must be placed at the root of the requested target domain without any HTTP redirects.
Cheers
Laurent
I’m happy
-
Inappropriate?Last try before email ;) pre doesn't work trying with code
<?xml version="1.0" encoding="utf-8"?>
I’m happy
-
Inappropriate?Chad,
I sent an email
Cheers
Laurent -
Inappropriate?We've added the file you provided to be served by Tracker. It should be available in an upcoming release.
The company thinks
this is one of the best points
-
Inappropriate?I have tried the new deployment you made on 23 which contain the file. Now we can build Silverlight clients. Very nice! Thanks
I’m super happy
Loading Profile...



EMPLOYEE