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

I had a problem with web parts being duplicated whenever their feature was reactivated, so I made a question about that.

It was answered (and correctly so, I think) - I have to programmatically remove the duplicates. However, in sandbox solutions you just can't use the SPLimitedWebPartManager class, which is needed for all the straightforward removal techniques.

So how can I remove web part in a sandbox solution, via code?

share|improve this question
up vote 2 down vote accepted

The answer is short - you cannot do that using a Sandboxed solution.

share|improve this answer
Sad but true. Unfortunately, deploying our solution as a sandbox one is one of our requirements. – Renan Apr 22 '13 at 21:39

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.