How do you create/obtain a cross domain policy for an iis7 wcf service?


The missing link in my IIS7 + Silverlight 3.0 + WCF Service app is the cross domain policy. Are there any instructions on how to create/obtain such a policy. I understand that there are two xml files that need to go in the web root of the app. What do I put in them, how do I format them, does some template exist which indicates which fields need to be filled in? Are there instructions somewhere on msdn which explain how to do this? I'm just about out of possible terms to query google with, any pointers would be appreciated.

Thanks, Brian


Silverlight looks for clientaccesspolicy.xml (which is specific to silverlight) if thats not found it will fall back on crossdomain.xml which can also be used by flash for instance. You only need one of those (sockets only work with clientaccesspolicy.xml but webclient and http work with both).

Lets stick with clientaccesspolicy.xml for now since there are less caveats and the crossdomain.xml support was only added to catch up with flash since public services like flickr already have one.

The DTD including description for clientaccesspolicy.xml is at <a href="http://msdn.microsoft.com/en-us/library/cc645032%28VS.95%29.aspx" rel="nofollow">this page on MSDN</a>

this basic example should get your started

<?xml version="1.0" encoding="utf-8"?> <access-policy> <cross-domain-access> <policy> <allow-from> <domain uri="*"/> <!-- Allows calls from every domain --> </allow-from> <grant-to> <resource path="/api" include-subpaths="false"/> <!-- Only allows domain/api? to be called nothing else including api.txt, api/foo etc... --> </grant-to> </policy> </cross-domain-access> </access-policy>


Well, I think this might be the answer, but other answers are certainly welcome for discussion, esp. since we cant close the thread yet anyway...

<a href="http://timheuer.com/blog/archive/2008/04/06/silverlight-cross-domain-policy-file-snippet-intellisense.aspx" rel="nofollow">http://timheuer.com/blog/archive/2008/04/06/silverlight-cross-domain-policy-file-snippet-intellisense.aspx</a>


  • GROUP_CONCAT change GROUP BY order
  • Java error : cannot find symbol even if the .class file are all in the same directory
  • How to filter out or stop getting data field within Opendaylight(Oxygen) BGP-LS data change event
  • apply padding to end of line html css
  • How can I load a .sql file when running a Maven/Hibernate project?
  • Transition State Diagram R
  • Trim Not Working with Array from MySQL fetched String
  • Increase max url length in asp.net core
  • Angular - TypeError: Converting circular structure to JSON
  • OnSharedPreferenceChangeListener not called #2
  • On submit the form don't display its POST data
  • Using iText to fill text field background
  • how do I know if the mouse pointer is on the HTML element?
  • Powershell Regex to replace XML tag values
  • staticfiles and STATIC_URL with virrtualenv - django
  • Focus Traversal Policy in TitledPane
  • Using self.id to populate other fields in Django
  • eC (Ecere) how to not worry about private data fields of a class
  • draw pie chart using iOS quartz 2D
  • including Python.h in C++ file CDT
  • How to expand parent div to account for child's overflow?
  • Enabling DTD support in Sql Server
  • UWP/C# - Issue with AQS and USB Devices
  • How to define and use opencv mat of user type
  • Custom Tabgroup Appcelerator
  • Record samples being played with OpenAL
  • PostgreSQL Query without WHERE only ORDER BY and LIMIT doesn't use index
  • Seeking advice on Jetty HttpClient Hang
  • PHPUnit_Framework_TestCase class is not available. Fix… - Makegood , Eclipse
  • Projection media query: browser support and workarounds?
  • Sails.js/waterline: Executing waterline queries in toJSON function of a model?
  • Retrieving value from sql ExecuteScalar()
  • Different response to non-authenticated users and AJAX calls
  • Can Jackson SerializationFeature be overridden per field or class?
  • Display Images one by one with next and previous functionality
  • Google cloud sdk not working when python points python3
  • SQL merge duplicate rows and join values that are different
  • using HTMLImports.whenReady not working in chrome
  • how does django model after text[] in postgresql [duplicate]
  • Android Heatmap on canvas or ImageView