<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://weblogs.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Office Seat Map webpart</title><link>http://weblogs.asp.net/gabriellopez/archive/2008/06/27/office-seat-map-webpart.aspx</link><description>In our efforts to make the most of our intranet, and the SharePoint intranets projects we deliver, I'm developing a Silverlight based, Office Map webpart . I like to think of it as a Google Maps, or Virtual Earth, for the enterprise cubicles. It's fairly</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>re: Office Seat Map webpart</title><link>http://weblogs.asp.net/gabriellopez/archive/2008/06/27/office-seat-map-webpart.aspx#6421202</link><pubDate>Sat, 19 Jul 2008 16:58:03 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6421202</guid><dc:creator>gabouy</dc:creator><author>gabouy</author><description>&lt;p&gt;No, I'm using regular web references to query MOSS web services.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6421202" width="1" height="1"&gt;</description></item><item><title>re: Office Seat Map webpart</title><link>http://weblogs.asp.net/gabriellopez/archive/2008/06/27/office-seat-map-webpart.aspx#6417078</link><pubDate>Fri, 18 Jul 2008 20:18:46 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6417078</guid><dc:creator>Craig</dc:creator><author>Craig</author><description>&lt;p&gt;I take it you&amp;#39;re not using WCF to query the profiles? &amp;nbsp;For some reason, I&amp;#39;m not able to call the GetUserProfileBy&amp;lt;&amp;gt; web methods. It throws a strange formatter exception. &amp;nbsp;But only in WCF. Works fine in .NET 2.0.&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6417078" width="1" height="1"&gt;</description></item><item><title>re: Office Seat Map webpart</title><link>http://weblogs.asp.net/gabriellopez/archive/2008/06/27/office-seat-map-webpart.aspx#6327572</link><pubDate>Fri, 27 Jun 2008 14:22:20 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6327572</guid><dc:creator>gabouy</dc:creator><author>gabouy</author><description>&lt;p&gt;Carmine, Thanks! Since this code was paid for by one of our customers I cannot publish it without approval, If I get it I may do so in the future.&lt;/p&gt;
&lt;p&gt;Andy, I'm using MOSS UserProfile web service (http://&amp;lt;moss&amp;gt;/_vti_bin/userprofileservice.asmx), in a two step process, first I query the user store with a high privileges account in a scheduled process which generates an xml file. The second step is consuming the generated xml, which is published in a web application and consumed as a REST web service from the silverlight app. &lt;/p&gt;
&lt;p&gt;This is the piece of code I'm using to query the MOSS User profile store:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public static List&amp;lt;Profile&amp;gt; GetUserProfiles()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;List&amp;lt;Profile&amp;gt; profiles = new List&amp;lt;Profile&amp;gt;();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Dictionary&amp;lt;string, Profile&amp;gt; dictionary = new Dictionary&amp;lt;string, Profile&amp;gt;();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;MOSSUserProfile.UserProfileService service = new UserProfileService();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;service.Credentials = System.Net.CredentialCache.DefaultCredentials;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int numProfiles = (int)service.GetUserProfileCount();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (int i = 0; i &amp;lt; numProfiles; i++)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Profile p = new Profile();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PropertyData[] properties = service.GetUserProfileByIndex(i).UserProfile; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p.AccountName = GetPropertyStringValue(&amp;quot;AccountName&amp;quot;, properties);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (!dictionary.ContainsKey(p.AccountName)) &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p.PictureUrl = GetPropertyStringValue(&amp;quot;PictureURL&amp;quot;, properties);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p.Name = GetPropertyStringValue(&amp;quot;PreferredName&amp;quot;, properties);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p.Mobile = GetPropertyStringValue(&amp;quot;CellPhone&amp;quot;, properties);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p.PhoneExtension= GetPropertyStringValue(&amp;quot;WorkPhone&amp;quot;, properties);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;p.Email = GetPropertyStringValue(&amp;quot;WorkEmail&amp;quot;, properties);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;profiles.Add(p);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dictionary.Add(p.AccountName, p);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;profiles.Sort(new ProfileItemComparer());&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return profiles;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6327572" width="1" height="1"&gt;</description></item><item><title>re: Office Seat Map webpart</title><link>http://weblogs.asp.net/gabriellopez/archive/2008/06/27/office-seat-map-webpart.aspx#6327463</link><pubDate>Fri, 27 Jun 2008 13:48:18 GMT</pubDate><guid isPermaLink="false">c06e2b9d-981a-45b4-a55f-ab0d8bbfdc1c:6327463</guid><dc:creator>Carmine</dc:creator><author>Carmine</author><description>&lt;p&gt;What a great idea! Are you able to post your source on this project? Thanks!&lt;/p&gt;
&lt;img src="http://weblogs.asp.net/aggbug.aspx?PostID=6327463" width="1" height="1"&gt;</description></item></channel></rss>