Sharepoint: executing stsadm from a timer job + SHAREPOINTSystem rights + SHAREPOINTSystem rights.
SPUserToken sut = thisSite.RootWeb.AllUsers["SHAREPOINTSYSTEM"].UserToken;
using (SPSite syssite = new SPSite(thisSite.Url,sut)
{
// Do what you have to do
}
Tags: sharepoint privileges stsadm timer event-viewer
Source: By as answer to the question
This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 3.0
Related code-snippets:
- Is gettimeofday() guaranteed to be of microsecond resolution?
- MOSS SSP Issue - Failed database logins from deleted SSP.
- Alternative hostname for IIS web site internal access only.
- Retrieving the PC Name of a Client? (Windows Auth)
- Sharepoint COMException 0x81020037. Sharepoint COMException 0x81020037.
- Webpart registration error in event log.
- Is DateTime.Now a useful indicator of programming language performance?
- Upload files into SharePoint through the built-in Web Services.
- How should I make the process of debugging ASP.NET shared neosimple applications less time consuming?
- Resettable Java timer with C, C++ and C++.
- How do I get file versions from sharepoint?
- Is audio embedded with InfoPath?
- How do I use the SharePoint MultipleLookupField Control?
- How can I write person meta data in SharePoint with VBA or VSTO?
- SharePoint stream file for preview.