Search code examples
c#silverlightcross-domaincrossdomain.xmlwriteablebitmap

How do I disable silverlight cross-domain content protection for WriteableBitmap


I have an Esri map in silverlight and I am trying to get a screenshot. However, I am facing cross-domain content protection for writeablebitmap, saying "Pixels are not accessible".

Is there a way that I can disable this? or any other work around in silverlight 3 or 4?


Solution

  • you can kind of hack around this by rehosting the image. basically you can set up a wcf service on your server that acts as a proxy to the map, then when silverlight does the security check on your media source it will see that it is 'hosted' by your server, then it should let you render it to a Writeable bitmap. though this could obviously greatly increase the load on your server.