RE: Sharepoint Profile Update
- From: Gerhard <Gerhard@xxxxxxxxxxxxxxxx>
- Date: Thu, 14 May 2009 09:03:01 -0700
Thanks.
This would fit my need, but I get an error on the declaring the upmanager of
"Value cannot be null. Parameter name: serverContext". Searched on that, but
nothing I got back helped.
What I am trying to do is centralize my code into objects in a vb.net class
to compile into a .dll for use in various applications. There doesn't seem
to be anyway to access a web service from that otherwise I would use that.
If I could get the code you sent working though, that would be a fine
solution to use. Any suggestions on the above error?
Thanks.
Bob
""Steven Cheng"" wrote:
Hi Gerhard,.
Since sharepoint's SQL db structure is not documented, directly access the
database is not recommended and may cause unexpected problems.
If your application is to run on the sharepoint server-side, you can
consider creating a .NET console application which use object-model to
access the userprofile. For WSS3/MOSS2007 there is built-in types for
userprofile management.
#UserProfileManager Class (Microsoft.Office.Server.UserProfiles)
http://msdn.microsoft.com/en-us/library/microsoft.office.server.userprofiles
.userprofilemanager.aspx
here is a simple test codesnippt that update the userprofile property:
static void AccessUserProfile()
{
SPSite site = new SPSite("http://stcheng-2k3-vpc:8888");
UserProfileManager upmanager = new
UserProfileManager(ServerContext.GetContext(site));
UserProfile p1 =
upmanager.GetUserProfile(@"STCHENG-2K3-VPC\Administrator");
Console.WriteLine("Personal Site:{0}", p1.PersonalSite.Url);
//update "AboutMe" property
p1[PropertyConstants.AboutMe].Add("Hello World!");
p1.Commit();
site.Close();
}
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: =?Utf-8?B?R2VyaGFyZA==?= <Gerhard@xxxxxxxxxxxxxxxx>
Subject: Sharepoint Profile Update
Date: Wed, 13 May 2009 16:10:01 -0700
I have a vb.net class that I would like to use to update SharePoint profile
information (like email, phone, etc) from another application's database.
I
would like to use stored procedures to do this. I can successfully get the
stored procedures to work to get the current data, but the procedure that
looks like what I want to use, profile_UpdateProperty, is not documented
where I could find it in enough detail and with an example to make it
usable.
Is there sample code available that shows how to do this (say update the
WorkEmail) using build in stored procedures in SharePoint? Thanks
- Follow-Ups:
- RE: Sharepoint Profile Update
- From: "Steven Cheng"
- RE: Sharepoint Profile Update
- References:
- Sharepoint Profile Update
- From: Gerhard
- RE: Sharepoint Profile Update
- From: "Steven Cheng"
- Sharepoint Profile Update
- Prev by Date: Sr .Net Developer at NY Position for 6 Months contract to Hire
- Next by Date: RE: Sharepoint Profile Update
- Previous by thread: RE: Sharepoint Profile Update
- Next by thread: RE: Sharepoint Profile Update
- Index(es):
Relevant Pages
|