When i tried to Activate Feature of Timer Job It returns error : Access Denied
Scope of Feature is "Site"..
private static void CreateJob(SPSite site)
{
try
{
SPSecurity.RunWithElevatedPrivileges(delegate()
{
TenderTimerJob job = new TenderTimerJob(JobName, site.WebApplication);
job.Properties.Add("SiteCollectionUrl", site.Url);
SPMinuteSchedule minutes = new SPMinuteSchedule();
minutes.BeginSecond = 0;
minutes.Interval = 30;
minutes.EndSecond = 30;
job.Schedule = minutes;
job.Update(); //Error Generates here
});
}
catch (Exception ex){
string str = ex.Message.ToString();
}
}