.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

How to iterate to Profile pictures?

Posted By:      Posted Date: October 11, 2010    Points: 0   Category :SharePoint

User stored his/her profile picture in "Shared%20Pictures/Profile%20Pictures/bhind8ball.bmp" path in SSP. How to get this List item using this url? Or How to iterate SharePicture/ProfilePicture to get this List item using SPQuery?


Please share thoughts.


View Complete Post

More Related Resource Links

Profile Pictures not displayed in Discussion Board in SharePoint 2007

Picture Placeholders are displayed instead of Profile Images in Discussion boards in MOSS 2007 but when you click on the user, their pictures appeared in MySites, also with Search People. How to fix this?!

Iterate through profile information


I have a site I'm working on where the values being stored in user profiles can change so I need to iterate through all available profile options and display them (say in a label or gridview for instance).

Here is an example of a web.config I threw together

<profile enabled="true">
        <group name="Demographics">
        <add name="FirstName" type="String"/>
        <add name="LastName" type="String"/>

Programmatically Uploading User Profile Pictures using Powershell

I've reviewed other solutions for this, but I need clarification on something I'm not getting by reading other posts.  I'm using a powershell script to: 1)  Upload profile pictures on our network into the User Photos picture library in the My Site Host.  This works. 2) Associate a picture to a user profile.  I'm using this command ... $up.get_Item($picturePropertyName).Value = $PortraitUrl ... where $up is the user profile, $picturePropertyName is the property name of the url (PictureUrl), and $PortraitUrl is the full path to the picture uploaded in point 1 above.  This isn't working. 3) Eventually I will be executing the Update-SPProfileStore command to automatically resize the images once they've been added. Clarification required ... when I associate a picture to the user profile in step 2 above, is this what will automatically generate the 3 thumbnails for me (in the Profile Picture folder)?  Or ... do I have to manually create the 3 images?  Or ... will it associate the image I've provided and then the Update-SPProfileStore command will create the 3 resized images for me? I notice that when I associate a picture to a profile using the 'Edit my Profile' UI, it automatically creates the thumbnails for me.  I'm just not understanding how these pieces fit together.  I see some code snippets out there for r

Moved MySites. Now suddenly while Search finds the user profile pictures, user profile pictures don'


We did an architectural change and moved MySites by creating a new MySite host, assigning it to the User Profile Service application and then deleting the old MySite host.

I'd like to avoid recreating the User Profile Service application. Is it possible to fix this UPS issue (I assume it's an UPS issue), without recreating UPS?

Profile Pictures - MOSS 2007



We have our employee pictures loaded into a picture library in SharePoint.  Each photo is named the same as the employee's user name.  How can I automatically set the picture URL property of the profile import to match these images to the user profiles?



Programmatically Upload Pictures to SharePoint Profile Picture Store using Powershell


I'm trying to create a powershell script that will bulk upload pictures to the SharePoint Profile Picture Store located in a "http://sp2010/my/User Photos/Profile Pictures".  I found Chris Johnson's blog post ( http://blogs.msdn.com/b/cjohnson/archive/2010/05/08/sharepoint-2010-office-2010-and-profile-pictures.aspx )  extremely useful.  However, the SPUtils.ps1 that is referenced on his site doesn't seem to support uploading to the "Profile Pictures" folder within the "User Photos" picture library at "http://sp2010/my/User Photos".  My account has full control of the "User Photos" picture library and the "Profile Pictures" folder, and I can upload to the "User Photos", root directory with no problems.  The file fails to upload to the "Profile Pictures" folder.

Currently my Powershell script processes a folder of pictures.  First, it pulls the file name and does some manipulations to retrieve the employee number of the employee.  Second, it performs an active directory search to get the employee's user name.  Third, it resizes the photo to match the small, medium, and large thumbnails generated by a traditional manual upload of a photo from the user's edit profile page.  After each creation of the resized picture it uploads the picture t

Mysite profile pictures not showing in people and groups, or search results

My organization is running MOSS 2007 Enterprise with search.  Picture profiles uploaded to the user's mysite only appear while browsing from the Default zone.  When browsing the Internet zone, a broken link appears in place of the picture when viewing pages such as "People and Groups" or search results.  For example:

Default zone:

http://moss1:5154   <---- mysite
http://moss1:5155   <---- main sharepoint site

Internet zone:

https://mysite.domain.com  <---- extended mysite
https://domain.com             <---- extended main sharepoint site

The picture profile url that is appearing while browsing the Internet zone is:


Instead of:


All of the textual information is coming over fine, just the images have invalid urls for the current zone.
Does anyone know how to fix this?

Any insights appreciated,


Profile Pictures in SharePoint 2010



One of my customer needs to use profile pictures in SharePoint, Outlook and Office communicator, but he doesn't want the pictures to be replicated in Active Directory.

Could any of you let me know if this is possible? If yes, please let me know how to proceed on this.




Profile Pictures showing as broken images


I noticed today that all of the people that have added profile pictures are now showing as the broken image "red X". I checked the User Photos library located in the root mysite site collection and all 60 people that have added their images show up as a broken image. I tried re-uploading my own image and it completed without issue, the entry in the library updated with today's date but again broken image.

My farm has been running great and the only thing that has change recently is I applied the ClaimAuth KB update that central admin was having a fit about. I'm going to dig thru the logs and see if there's any info but thus far I haven't found much.

Code Optimized Web Development Profile (VS 2010 and .NET 4.0 Series)

When you first run VS 2010 it prompts you to select an IDE profile to use. The profile you select will configure how tool windows are displayed/docked in the IDE by default and set the default keyboard shortcuts. You can then customize any of these settings by using the Tools->Options menu within the IDE and then override/change them. You can also later reset your profile and pick a different one by choosing the Tools->Import and Export Settings menu command.

Configuring Profile Image Export in SharePoint 2010

It's no secret that I am thrilled with the new social features of SharePoint 2010. I am most excited about the new Profile Picture handling. I strongly believe that the more we can show the faces of our colleagues to one another the more connected we will feel. Clearly Microsoft feels that way as witnessed by the many features that make use of the Profile Image like the Activity Feed and Colleagues list

Profile not being save after redirect.



I am trying to save values into a Profile on Page1, then redirect to Page2 and access those values.  However, after the page redirects the profile values are blank as if they were never saved.   When stepping through the code I can see that they are being save on Page 1.

I suppose I could use session variables to store the information but I don't understand why saving the profile doesn't work.

private void PayWithPayPal()
        ProfileCommon profile = this.Profile;

        if (Global.CurrentUserName.Length > 0)
            profile = this.Profile.GetProfile(Global.CurrentUserName);
        profile.FirstName = uxFirstNameShipping.Text;
        profile.LastName = uxLastNameBilling.Text;
        profile.ShippingAddress.AddressLineOne = uxAddressLineOneShipping.Text;
        profile.ShippingAddress.AddressLineTwo = uxAddressLineTwoShipping.Text;
        profile.ShippingAddress.City = uxCityShipping.Text;
        profile.ShippingAddress.State = uxStateShipping.Text;
        profile.ShippingAddress.ZipCode = uxPostalCodeShipping.Text;

        Response.Redirect("~/expresspayment.aspx", false);

protected void Page_Load(object sender, EventArgs e)
        ProfileCommon p

Facebook like Profile URL with HttpModule


I am trying to make URLs for users profile pages like Facebooks e.g. http://site.com/username. I had a code snippett from a book for how to do this but when it runs it says its processing a request that will never finish. Im new with HttpModules/handlers but Ive looked over like 100 pages trying to figure this out. My code is below. Any help figuring this out would be greatly appreciated..

public class URLRouter : IHttpModule
/// <summary>
/// You will need to configure this module in the web.config file of your
/// web and register it with IIS before being able to use it. For more information
/// see the following link: http://go.microsoft.com/?linkid=8101007
/// </summary>
#region IHttpModule Members
private IUserRepository _userRepository;

public URLRouter()
_userRepository = ObjectFactory.GetInstance<IUserRepository>();

public void Dispose()
//clean-up code here.

public void Init(HttpApplication context)
context.PostResolveRequestCache += (new EventHandler(this.Application_OnAfterProcess));

Editor's Note: More than Pretty Pictures


Complete freedom in creating the user experience can be a double-edged sword, but a little bit of artistry can transform an application's usability.

Howard Dierking

MSDN Magazine August 2008

Profile Provider in Asp.Net MVC

The article Profile Provider in Asp.Net MVC was added by krokonoster on Wednesday, June 02, 2010.

Finding very little information on how to implement Profiles in Asp.Net MVC, I thought I'd share my solution to implement this. For demonstration purposes, let's assume you want to store a user's First and Last Name only. Firstly I created

Extended MySite: Profile picture uploading to the wrong zone.

I'm experiencing a problem where uploading a profile picture, in a MySite, uploads it to the wrong zone.

What I've done is created one web application and configured SSP to use that same one. As a result, the MySite host location is in that same web application:

Default Zone:
http://my.domain.com  <-- default SharePoint site.
http://my.domain.com/personal <-- MySite host

I then extended that web application to enable FBA & anonymous access:

Internet Zone:
http://extended.domain.com <-- extended default SharePoint site.

Now I"m able to navigate to a user's MySite using the extended URL (http://extended.domain.com/personal)...but when I upload a new profile picture in my MySite... it prompts me for new credentials because it's trying to upload to the Default zone (http://my.domain.com).

I found the following thread that talks about this...but there wasn't any resolution:

What is the best practices when configuring a MySite in an extended web application? How can I fix the situation I'm encountering above?

P.S. I tried to change the MySite Host location (via SSP in the Central Administration)
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend