We are using SharePoint Foundation 2010. We are creating content database and site collection using server object model. We have more than 1000 users in SharePoint. As content database and site collection creation are administartive task, only farm administartor can do that. In our case any user should be able to create content database and site collection with farm administartor account. Can we use SPUser or Is there any other way to do this ? Can you please provide me any code or link through which I can resolve the above issue ?
How to impersonate Farm Administrator in server object model?
934 Views Asked by Shailesh Jaiswal At
1
There are 1 best solutions below
Related Questions in SHAREPOINT-2010
- Upload a document to a SharePoint document library (can be via Rest Api/other) using C# & also retrieve the unique id of the document
- Sharepoint alers email deletion from alerts
- Apache Reverse Proxy erases <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
- Can REST-like URLs be passed/recognized in sharepoint 2010?
- Configure SharePoint 2010 UPS with PowerShell
- How to dynamically create Sharepoint ComboBoxes?
- SharePoint 2013 Custom list field iterator not saving values for MultiLine or person columns
- Publicly available InfoPath form connecting to Access db in a restricted location
- Why does my Sharepoint WebPart deploy (nominally), but is still not available for adding to a page/form?
- Does CAML Query has a default RowLimit value?
- SharePoint CSOM
- I am getting a The type or namespace name 'listcolumns' could not be found (are you missing a using directive or an assembly reference?)
- Sharepoint 2010 CMIS Integration
- JQuery Show All Tab - Issue with on click
- jQuery UI API failing to load properly with LABjs
Related Questions in IMPERSONATION
- How to import meetings into office365 (EWS and Powershell?)
- Impersonate a server
- Cast UserPrincipal to WindowsIdentity
- Bring browser to front that is started by ShellExec/Process.Start
- Shared folder access with login & password impersonation - W2K8 IIS7
- Change Password Windows AD C#
- CreateProcessAsUser() in C# .NET Framework API (NOT Win32 API)
- ASP.Net Identity losing Impersonation
- Impersonated User unable to access shared drive
- selenium web driver running as different user not getting profile/session of user
- Copy a file from one domain to another (not a local file)
- CreateMutex fails after impersonation
- Windows Impersonation Java from *nix
- Manage machines on the network using an ASP.NET intranet site with Windows authentication
- Identity Impersonation with ASP.NET 4 MVC not working as expected
Related Questions in SHAREPOINT-API
- How to get only file names from sharepoint using any API's and c#
- Call SharePoint online REST API from azure API
- SharePoint 2013 API - get only newly modified list items
- Failed to acquire token silently. Call method AcquireToken not working
- SPQuery : Difference between Query and ViewXml properties?
- Sharepoint basics and any useful resources?
- event handler for page modification
- SharePoint user info User Information List and People Column Type
- Sharepoint 2010 SPListTemplate how to get list of fields?
- Sharepoint file upload randomly results in access denied error
- How to keep log of all users who are visiting site or page on site Sharepoint 2007
- Get all the machines in sharepoint farm
- How to keep log of all search keywords on Sharepoint 2007 site
- Sharepoint - query article data externally
- How can I persist web part state from inside a client web part content page?
Related Questions in SHAREPOINT-OBJECT-MODEL
- find out what item id failed executeQueryAsync item creation
- Programmatically enumerating Web Part Zones of a Publishing Page Layout
- Authenticating client with office 365/SharePoint online
- SharePoint 2007 : How to programmatically upload binary file into Document Library?
- Removing Workflow from the list using SP Object Model in SharePoint 2010
- Add column to SharePoint Online 2013 list via Powershell v3
- Develop Infopath 2010 with object model locally without SharePoint 2010
- How to detect page refresh in .net
- Is there a way get lookup fields in random lists associated with a specific list programmatically?
- How to get changes from sharepoint 2010 client object model?
- Sharepoint 2010 - make Title, Description and Keyword fields as required fields in Picture Library using server-object-model
- Reading sharepoint site through object model within ASP.NET website produces errors
- SharePoint And Excel Integration
- SPListItem.Update() throws exception when trying to update Title. 255 char limit issue with encoding
- Needed help to build caml Query with multiple <And>
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
It sounds like you might need to use the SPSecurity.RunWithElevatedPrivleges. This will allow you to run the code as if you were the
farm administratorthe application pool identity account. Be careful because it gives the user running the codefullhigher access, but it sounds like that is what you want.