Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am developing a Silverlight application. It interacts with SharePoint 2010 using SharePoint Silverlight Managed Client Object Model.

One of the application functionalities is to create a SharePoint 2010 site. If the provided URL of the site that is to be created belongs to the same SharePoint web application where the Silverlight application is loaded, the site gets created without any issues. However, if the URL targets a SharePoint web application different than the one where the Silverlight application is loaded, I get the Security exception.

In the site creation method I am creating the new client context that matches the specified URL and then calling Object Model's site creation method:

this.ClientContext = new ClientContext(uriFromApplication);

WebCreationInformation wci = new WebCreationInf...

this.ClientContext.Web.Webs.Add(wci);
this.ClientContext.ExecuteQueryAsync(onSuccess, onFail); 

Could anyone explain why am I getting the Security exception? Thanks.

I've asked the same question here at stackoverflow.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

It turns out that this is the security restriction applied by Silverlight's Client Object Model. It can, however, be overcome by adding client access policy file to the root folder of the SharePoint’s web application as described here. More details can be found in this MSDN article.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.