Read this one carefully - it is the bible of elevated permissions for SharePoint. http://daniellarson.spaces.live.com/blog/cns!D3543C5837291E93!2005.entry
From: [email protected] [mailto:[email protected]] On Behalf Of ken zheng Sent: Tuesday, 14 July 2009 10:59 AM To: [email protected] Subject: Access is denied when create a subsite Hi Guys: I got Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) error when user runs SPSecurity.RunWithElevatedPrivileges(new SPSecurity.CodeToRunElevated(delegate() { web = parentWeb.Webs.Add(relativeUrl, title, description, LCID, template, useUniquePermissions, convertIfThere); })); It is indeed a permission problem as I (Site Admin) has no issue. I think SPSecurity.RunWithElevatedPrivileges should be able to do it, is it right? Cheers Ken ________________________________ Support procedure: https://www.codify.com/lists/support List address: [email protected] Subscribe: [email protected] Unsubscribe: [email protected] List FAQ: http://www.codify.com/lists/ozmoss Other lists you might want to join: http://www.codify.com/lists -------------------------------------------------------------------------------- Support procedure: http://www.codify.com/lists/support List address: [email protected] Subscribe: [email protected] Unsubscribe: [email protected] List FAQ: http://www.codify.com/lists/ozmoss Other lists you might want to join: http://www.codify.com/lists
