Wednesday, February 24, 2010

Access Denied when callign SPService.Update()

Access Denied when callign SPService.Update().
This error was not seen in MOSS 2007, however now when deployed to SharePoint 2010 we are seeing this error when the code reaches SPService.Update() i.e. base.update();

There is a Web service AppWebService deployed to SharePoint 2010 & it consumes OneOfMyServices: SPService, IBackupRestore to store/persist a XML file.

Lines of code



base.Update(); //Errors out here with Access Denied


Exception details


Stack Trace: at Microsoft.SharePoint.Administration.SPPersistedObject.BaseUpdate()
at MY.APPServices.Services.OneOfMyServices.b__1()
at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.b__2()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)

{Void BaseUpdate()}
System.Reflection.MethodAttributes.Private | System.Reflection.MethodAttributes.FamANDAssem | System.Reflection.MethodAttributes.HideBySig

Declarign Type = {Name = "SPPersistedObject" FullName = "Microsoft.SharePoint.Administration.SPPersistedObject"}

OS - Windows 7 ultimate
SharePoint 2010 beta

if any one has seen this or was able to resolve kindly reply with possible directions, resolution ....

No comments:

Post a Comment