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

Im creating a blog subsite in the featureactivated event but it errors out everytime i activate the feature. looking at the logs i can see there is an access denied entry however the blog subsite is created fine. Heres my code

    public override void FeatureActivated(SPFeatureReceiverProperties properties)
        LoggerWrapper lw = new LoggerWrapper();

            SPWeb thisWeb = (SPWeb)properties.Feature.Parent;

            using (SPWeb newBlog = thisWeb.Webs.Add(
                "Team News", 
                "News Blog", 

                "blog site provisioned for " + 
        catch (Exception ex)
            string message = 
                "Error provisioning blog site for " + ((SPWeb)properties.Feature.Parent).Name + "\n\n" +

            lw.Error(ex, message, Categories.Event.Unexpected);
share|improve this question
up vote 0 down vote accepted

I can imagine the error coming from one of the following:

  • The LoggerWrapper - Does the current account have access to write to where it writes? (EventLog?)
  • A feature stabled onto either BLOG#0 or GLOBAL#0
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.