-
February 28th, 2011, 03:03 PM
#1
[RESOLVED] impersonate user SharePoint 2010 client object model
I have a .net asp app that updates a SP form. I am using the Client object model. Currently when inserting a record the record is inserted using the App pool ID. Is it possible to somehow set the context to use the ID of the person logged into the webapp or a custom ID separate from the default. I can't find any data in this in the web or gong through the context methods. Can this be done?
-
March 4th, 2011, 09:09 AM
#2
Re: impersonate user SharePoint 2010 client object model
i'm not too sure but this article on learning sharepoint has a few details, and have you looked into using a different Authentication type within sharepoint...
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
-
March 10th, 2011, 08:57 AM
#3
Re: impersonate user SharePoint 2010 client object model
Unfortunately, changing the Authentication type is not possible with our current setup. However, I found that you could impersonate a particular user by using something like the following code (sorry I don't have my actual code with me so doing from memory):
Code:
clientcontext.credentials = new NetworkCredentials(<username>,<Password>,<domain>)
When you send the data up the client object model it will use the credentials set instead of the app pool.
Sorry, forgot to come back and update this when I came up with the resolution.
-
March 10th, 2011, 01:19 PM
#4
Re: [RESOLVED] impersonate user SharePoint 2010 client object model
N.P. on the delay to come back ..Just glad you did come right, and thanks for posting your solution, So many members don't bother comming back, leaving so many threads unresolved..
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
WPF Articles : 3D Animation 1 , 2 , 3
Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|