DeploymentCatalog 安全错误
我正在尝试使用 DeploymentCatalog 通过 MEF 加载我的服务实现。我在单个 xap 中实现了。当我使用以下代码下载它时,一切正常:
var Catalog = new DeploymentCatalog("MyXap.xap");
目录.DownloadAsync();
当我写相同的内容时,我将我的 xap 放在远程服务器上,例如 http://ip:90/Myxap.xap代码,但使用 uri ,它会引发部署异常:
var Catalog = new DeploymentCatalog(new Uri("http://ip:90/MyXap.xap",UriKind.Absolute));catalog.DownloadAsync();
任何帮助。
提前致谢 ...
I'm trying to use the DeploymentCatalog to load my service implementations by MEF. I have the implementation in a single xap. when I use the following code to download it , every thing is ok :
var catalog = new DeploymentCatalog("MyXap.xap");
catalog.DownloadAsync();
I put my xap on a remote server , say on http://ip:90/Myxap.xap, when I write the same code but with the uri , it throws a deployment exception:
var catalog = new DeploymentCatalog(new Uri("http://ip:90/MyXap.xap",UriKind.Absolute));catalog.DownloadAsync();
Any help .
Thanks in advance ...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您尝试下载的 XAP 托管在与您的 Silverlight 应用程序不同的域(我认为是不同的端口),您将需要 跨域策略文件位于托管 XAP 的网站上,以允许 Silverlight 应用程序访问它。
如果这不是问题,您将需要提供更多信息。编辑您的问题以包含您收到的部署异常的全文。
If the XAP you are trying to download is hosted at a different domain (or different port, I think) than your Silverlight App is, you will need a cross domain policy file on the site that hosts your XAP to allow your Silverlight App to access it.
If that's not the problem, you'll need to provide more information. Edit your question to include the full text of the deployment exception you get.