none
The EXECUTE permission was denied on the object 'proc_putObject', database 'WSS_Config', schema 'dbo

    Question

  •  

    Hi Friends

    i am getting the below error on the following line with "featureactivated" ( I have attached featureactivated code block at the end).

     timerjob.Update();

        public class FeatureTest : SPFeatureReceiver
        {
            public override void FeatureActivated(SPFeatureReceiverProperties properties)
            {
    //            SPSecurity.RunWithElevatedPrivileges(delegate
                {

                    SPWebApplication webApplication = SPWebApplication.Lookup(new Uri("http://scshyd-160:6666"));    //My URL
                    foreach (SPJobDefinition job in webApplication.JobDefinitions)
                    {
                        if (job.Name == "duedateCheck")
                            job.Delete();
                    }

                    DueDate timerjob = new DueDate("duedateCheck", webApplication);
                    SPMinuteSchedule schedule = new SPMinuteSchedule()
                    {
                        BeginSecond = 0,
                        EndSecond = 59,
                        Interval = 30,
                    };
                    timerjob.Schedule = schedule;
                    timerjob.Update();

      //          });
            }
            public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
            {
                SPWebApplication webApplication = SPWebApplication.Lookup(new Uri("http://scshyd-160:6666"));//MY URL

                                                                                                                                                    //This code working fine
                foreach (SPJobDefinition job in webApplication.JobDefinitions)
                {
                    if (job.Name == "duedateCheck")
                        job.Delete();
                }
            }

          }
    }

     

     

    The feature-activation goes through with STSADM command but not through code when I goto site-collection-features and try to activate the feature.

     

    then i am activating feature "Unknown error",While i am attaching debug the process it shows above error.

    Any idea in this?


    Thursday, April 28, 2011 11:20 AM

Answers

All replies