RE: Sharepoint Profile Update



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
.



Relevant Pages

  • RE: Dataset update inconsistency
    ... If you're using Stored Procedures, then you can either create new stored ... Microsoft Online Community Support ... The MSDN Managed Newsgroup support offering is for non-urgent issues ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.distributed_apps)
  • RE: Updating sql05 with Stored Procedure
    ... Have you provided stored procedures for select/insert/update/delete? ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ... project analysis and dump analysis issues. ...
    (microsoft.public.dotnet.framework.adonet)
  • I encounter the same error, but my data does not have the benefit of record tags.
    ... Microsoft Online Community Support ... You can send feedback directly to my manager at: ... where an initial response from the community or a Microsoft Support ... I am having trouble creating one input flat file. ...
    (microsoft.public.biztalk.general)
  • RE: POPUp - VB.Net
    ... how does your timer interact with the threads in your ... Private Sub Button1_Click(ByVal sender As System.Object, ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.vsnet.general)
  • Re: System Error (1003) - 0x000000CB
    ... MCSE, CCEA, Microsoft MVP - Terminal Server ... A call to Microsoft Support seems appropriate. ... Computer: TERMSERVER1 ...
    (microsoft.public.windows.terminal_services)

Quantcast