How to create an SPSite object with the token from the SSP app pool user in sharepoint?

StackOverflow https://stackoverflow.com/questions/9472139

  •  13-11-2019
  •  | 
  •  

Question

How to create an SPSite object with the token from the SSP app pool user?

Was it helpful?

Solution

I think what you are asking for is to elevate the current context to the highest level.

You can achieve this by Running Commands with Elevated Privileges in Windows SharePoint Services 3.0
See also SPSecurity.RunWithElevatedPrivileges Method

There shouldn't be a need to mess with tokens.

OTHER TIPS

The quickest way, if it's a single operation, would be to launch a command prompt with the identity of that application pool account (why the SSP one ?) and launch a stsadm -o createsite ... command. Your site will thus be created assuming that the SSP account has enough right to do so (which I guess will be the case, a farm account might be relevant at that level)

Do you want to allow specific user to spawn new site collection from another site collection ? A self service site creation portal might be better in that case.

Kindly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top