开发者

SL4 -> MEF DeploymentCatalog fails to download file with SecurityException

I have a silverlight app which is hosted on an azure webrole. I use the MEF deployment catalogs to load additional xap files at runtime. Now I want to store these additional xap files in azure blob storage instead of the ClientBin folder. I have placed these xap files in a public blob container.

However in my DownloadCompleted handler I get a SecurityException:

{System.Security.SecurityException ---> System.Security.SecurityException: Security error. at Sy开发者_JAVA百科stem.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)

Would this be related to cross domain calls? I have no idea what the problem could be. If the xap files are loaded from the ClientBin folder it works just fine. Maybe a cross domain issue?

Thank you!

My code is pretty straightforward:

var container = new AggregateCatalog(); // grab social network provider foreach(string module in RequieredModules) // absolute uri's to the xap files in blob storage { container.Catalogs.Add(CreateCatalog(module)); } CompositionHost.Initialize(container);

private DeploymentCatalog CreateCatalog(string uri) { var catalog = new DeploymentCatalog(new Uri(uri)); catalog.DownloadCompleted += new EventHandler

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜