Hi,
I getting "Exception : Access is denied" While calling the timerjob.RunNow() method.For this i have given the "NetworkService" in the Identity in Process Model in for the Application pool of my site collection and Log On for the Timer service to "NetworServices" .But i change the "NetworkService" to the "CustomAccount" it is running perfectly and in the timerjob LogOn The same username and password.
What to do..
Help me...
This is Exactly i got
Exception : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). Stack Trace : at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bPreserveItemUIVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback) at Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean b... c5c40174-26a4-44f7-8981-5e3ce1da983bAdd, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Guid newGuidOnAdd, Int32& ulID, Object& objAttachmentNames, Object& objAttachmentContents, Boolean suppressAfterEvents, String filename, Boolean bPreserveItemUIVersion) at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents, String filename, Boolean bPreserveItemUIVersion) at Microsoft.SharePoint.SPListItem.SystemUpdate() at CyberStreams.ListArchive.ListArchiveConfigurer.ListArchiveConfigurerUserControl.<>c__DisplayClassc.<createList>b__b() at Micro... c5c40174-26a4-44f7-8981-5e3ce1da983b
soft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2() at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param) at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode) at CyberStreams.ListArchive.ListArchiveConfigurer.ListArchiveConfigurerUserControl.createList() at CyberStreams.ListArchive.ListArchiveConfigurer.ListArchiveConfigurerUserControl.buttonArchieveDates(String startDate, String endDate, Int32 checkYearBegin, Int32 checkYearEnd) at CyberStreams.ListArchive.ListArchiveConfigurer.ListArchiveConfigurerUserControl.btnDates_Click(Object sender, EventArgs e) c5c40174-26a4-44f7-8981-5e3ce1da983b