Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Do we have My Site details available in web-service share point 2010.

@ David Lozzi: i want to fetch the data of "About me" using Web Service. I need to display the data in the DataView. Is there any web service which provide the Mysite details to display in Dataview.

share|improve this question
    
what details? My Site is a site collection, so the web services that are available for your team sites are available on my sites.... –  David Lozzi Dec 13 '12 at 13:18
add comment

1 Answer

According to you later edit, you actually want to display information from the User Profile Services. "About me" is a field of the User Profile.

Yes, there is a webservice, which can return you User Profile data. It is located at http://<site URL>/_vti_bin/userprofileservice.asmx. Here is a code sample, which displays you all the User Profile properties. It assumes, that you have added the above web service as a Web reference to your Visual Studio project:

static void GetUserProfilePropertyData()
{
    UserProfileWebService.localhost.PropertyData[] properties = 
    myService.GetUserProfileByName("domainname\\username");
    for (int i = 0; i < properties.Length; i++)
    {
        Console.WriteLine(properties[i].Name);
        Console.WriteLine(properties[i].Value);
    }

    Console.Read();
}

But if your code runs on the Sharepoint farm, I think you should consider accessing the User Profile Service by the object model.

using ( SPSite site = new SPSite("site url"))
{
    ServerContext context = ServerContext.GetContext(site);
    UserProfileManager profileManager = new UserProfileManager(context);
    UserProfile profile = profileManager.GetUserProfile(@"domainuser");
    // you got user profile object. now you can use any property of it.
    // I think for the AboutMe field it would be
    var aboutMe = profile["AboutMe"] as string;
}

I hope this is what you were looking for.

Cheers!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.