English 中文(简体)
指定一个共享点,以向它开放。
原标题:Impersonating a sharepoint site to open it with custom account

• 如何用海关账户来创建2007年股份点,以便它获得标志,迅速获得箱子

最佳回答

Use SPSite constructor where you pass SPUserToken object To get token of some user, use SPWeb.AllUsers["userLoginName"].UserToken

问题回答

我认为,为了能够让用户觉醒你们,你应当用高档的pri子来管理你的代码,这或许是为什么要遵守标识(因为臭名昭著的用户会同意让另一个用户醒来)。

 SPSecurity.RunWithElevatedPrivileges(delegate()
            {           
   //is important that you instantiate your SPSite object within you elevated code        
              using (SPSite oSite = new SPSite("your site URL"))
                    {

                        using (SPWeb oWeb = "your web")
                        {
                          //your code to run elevated 
                        }
                    }
            });




相关问题
SharePoint 2007 Word Document Conversion Very Slow

I m calling the SharePoint API (SPFile.Convert - MOSS 2007) to convert a docx to html with the out-of-the-box Word to HTML converter. According to the SharePoint logs, the Launcher Service tries to ...

SharePoint user control deployment issue

I am using SharePoint 2007 Enterprise with Windows Server 2008. I am using VSTS 2008 + C# + .Net 3.5. I am new to SharePoint user control development and deployment. I am learning from, http://www....

how to create a web part to track page creation time

I am new to SharePoint Server 2007 Web Part, and I am using SharePoint Server 2007 on Windows Server 2008. I program using VSTS 2008 + C# + .Net 3.5. I want to create a simple web part which could ...

how to create a web part to track page creation time

I am new to SharePoint Server 2007 Web Part, and I am using SharePoint Server 2007 on Windows Server 2008. I program using VSTS 2008 + C# + .Net 3.5. I want to create a simple web part which could ...

How to override SharePoint field rendering in EditForm?

I have a list with a choice field, which is multiple choice - meaning many checkboxes. I d like to render it such that it will be surrounded by a frame, for example a DIV tag with a border. (The ...

Enable authorization on sitemap provider

I want to enable Authorization on the Site map provider. We have enabled anonymous access to the site and we want the Site map provider to be visible only to authorized users. I tried ...

how to integrate Blogs in sharepoint custom site

in my sharepoint site, I need to integrate blogs. can any one give me help with this? Integrating Blog in SharePoint site my sharepoint site Custom site Definition i am selecting custom site ...

Sharepoint 2007 Data view Webpart custom parameters

I m sort of new to the custom parameters that can be setup on a DataView Webpart. There are 6 options: - None - Control - Cookie - Form - QueryString - Server Variable I think that None, Cookie and ...

热门标签