如何为WriteableBitmap禁用Silverlight跨域内容保护 [英] How do I disable silverlight cross-domain content protection for WriteableBitmap

查看:384
本文介绍了如何为WriteableBitmap禁用Silverlight跨域内容保护的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Esri地图在silverlight和我想获得一个截图。但是,我面临的是跨域内容保护的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".

有没有办法,我可以禁用这个?或任何其他工作在silverlight 3或4?

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

推荐答案

您可以通过重新托管图片来解决这个问题。基本上你可以在服务器上设置一个wcf服务,作为地图的代理,然后当silverlight在你的媒体源上进行安全检查时,它会看到你的服务器托管它,那么它应该让你渲染它到一个可写位图。但这显然会大大增加您的服务器上的负载。

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.

这篇关于如何为WriteableBitmap禁用Silverlight跨域内容保护的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆