Credential while creating site in Share Point Portal

Call SPSecurity.CodeToRunElevated for executing CreateSite() method.This statement makes credential scope over Share Point server.

exeample:
SPSecurity.CodeToRunElevated elevatedGetSitesAndGroups = new SPSecurity.CodeToRunElevated(method which owns CreateSite method);
SPSecurity.RunWithElevatedPrivileges(elevatedGetSitesAndGroups);

Comments

Popular posts from this blog

Assembly Microsoft.Dynamics.Service.Plugins.dll can not be loaded. Dynamics CRM 365 Engine version 9 - CRM User creation error

Exception caught instantiating TERADATA report server extension SQL Reporting Services

Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified at Configuration class initiation in CrmServiceHelper.cv