Donnerstag, 28. Juli 2011

Unable to deactivate and delete sandbox solution?

1. I have made a template from a given SharePoint site
2. Uploaded it to another site collection to create new sites. (So the web site template is actually a sandboxed solution.)
3. Now, I created a subsite from that template, deleted that site and then wanted to remove the solution. Therefore I had to deactivate it before.
4. Tried to deactivate the solution - Boooom...

The error message I received was:

"Unable to access web scoped feature (Id: 10ef0abc-dbd4-484a-b9a9-4cc425e7dc0b) because it references a non-existent or broken web (Id: 56ab1e1e-a09a-4783-9947-3d79bc6473aa) on site 'http://wfe2'. Exception: System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.SPWebCollection.get_Item(Guid id) at Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId)"

The solution is, there is still the deleted site in the SharePoint database and the features from within the template are activated. Sandboxed solutions containing site templates cannot be deactivated and deleted when there are still sites available based on this template. So the features are a reference to that template (and its solution) and you are not able to deactivate it as long as this reference exists.


You have to don't just delete the site, you have to remove it from the recycle bin as well. So you have to be a site collection admin and delete the site from "site collection recycle bin".

1 Kommentar: