SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my solution catalog I have many sandboxed solution uploaded, I need to access the activated sandboxed solution in the Solution catalog.

Am accessing Solution catalog under a site as below

m_spSite.OpenWeb().Lists["Solution Gallery"];

I can then iterate through the list but problem is am not able to cast SPListItem to SPUserSolution hence i could not access the status of the solution.

How can I get the activated solution and its properties

Regards, Jeez

share|improve this question

Firstly, when using OpenWeb(), make sure you properly dispose of the resulting SPWeb object, or you may leak memory.

Secondly; the list items returned by Lists["Solution Gallery"] aren't the same as the SPUserSolution objects used to get them; you will need to load the SPUserSolution using the SPSite.Solutions property (which returns a SPUserSolutionCollection); and then using the index accessor to pull the required solution by Guid.

share|improve this answer

Your Answer


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.