<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1560006835189604679</id><updated>2011-08-28T21:50:05.135+12:00</updated><category term='CalendarItemType'/><category term='Exchange'/><category term='SharePoint'/><category term='PriorityQueue'/><category term='Update'/><category term='Crawler'/><category term='Rant'/><category term='CAML'/><category term='Book'/><category term='OOXML'/><category term='EWS'/><category term='ExchangeWebService'/><category term='Query'/><category term='WPF'/><category term='Sample Code'/><title type='text'>World @ Work</title><subtitle type='html'>My discoveries, gripes, seemingly unsolvable issues all in the one place to marvel at. :)</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://johannes-prinz.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://johannes-prinz.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Johannes</name><uri>http://www.blogger.com/profile/08421785096317614420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_vEwOgvW8-CM/STMfqaSt5TI/AAAAAAAAAJs/5KJxgmVYiQA/S220/mo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1560006835189604679.post-3656626736012213030</id><published>2009-07-21T14:21:00.002+12:00</published><updated>2009-07-21T14:42:19.816+12:00</updated><title type='text'>SPFeatureReceiver Guidance</title><content type='html'>&lt;span style="color:#ff0000;"&gt;CAUTION&lt;/span&gt;! This is starting to become a &lt;span style="color:#ff0000;"&gt;PET PEEVE&lt;/span&gt; of mine!&lt;br /&gt;&lt;br /&gt;Features can be managed from &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;stsadm&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;exe&lt;/span&gt;, Site collection features web &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;ui&lt;/span&gt;, Site features web &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;ui&lt;/span&gt;, console apps, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;powershell&lt;/span&gt; scripts, feature staplers and the list goes on and on.&lt;br /&gt;To make sure your feature &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_5"&gt;receivers&lt;/span&gt; work no matter where the feature is being activated from do yourself a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_6"&gt;favour&lt;/span&gt; and keep on reading.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;SPFeatureReceiverProperties.Feature.Parent can be many things depending on the scope of your feature and where it's being activated from so please make sure you check before using it. So many times have I found great features in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;CodePlex&lt;/span&gt; that I would like to staple to site definitions or deploy/activate using &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;powershell&lt;/span&gt; or other mediums and find I get this.&lt;br /&gt;&lt;br /&gt;Value does not fall within the expected range.   at ###.###.FeatureReceiver.FeatureActivated(SPFeatureReceiverProperties properties)&lt;br /&gt;&lt;br /&gt;For Site Scoped Features&lt;br /&gt;&lt;br /&gt;public override void &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;FeatureActivated&lt;/span&gt;(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;SPFeatureReceiverProperties&lt;/span&gt; properties) {&lt;br /&gt;   &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;SPSite&lt;/span&gt; site = properties.Feature.Parent as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;SPSite&lt;/span&gt;;&lt;br /&gt;   if (site == null)&lt;br /&gt;   {&lt;br /&gt;      &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;SPWeb&lt;/span&gt; web = properties.Feature.Parent as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;SPWeb&lt;/span&gt;;&lt;br /&gt;         if (web != null)&lt;br /&gt;            site = web.Site;&lt;br /&gt;   }&lt;br /&gt;   if(site == null)&lt;br /&gt;      return new &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;ArgumentNullException&lt;/span&gt;("Can't find a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;refrence&lt;/span&gt; to a site!");&lt;br /&gt;      //Or check for parent being a Web app or log it&lt;br /&gt;&lt;br /&gt;   // Do Stuff&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;For Web Scoped Features&lt;br /&gt;public override void &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;FeatureActivated&lt;/span&gt;(&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;SPFeatureReceiverProperties&lt;/span&gt; properties) {&lt;br /&gt;   &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;SPWeb&lt;/span&gt; web = properties.Feature.Parent as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;SPWeb&lt;/span&gt;;&lt;br /&gt;   if (web == null)&lt;br /&gt;   {&lt;br /&gt;      &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;SPSite&lt;/span&gt; site = properties.Feature.Parent as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_22"&gt;SPSite&lt;/span&gt;;&lt;br /&gt;      if (site != null)&lt;br /&gt;         web = site.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_23"&gt;OpenWeb&lt;/span&gt;();&lt;br /&gt;   }&lt;br /&gt;   if(web == null)&lt;br /&gt;      return new &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_24"&gt;ArgumentNullException&lt;/span&gt;("Can't find a &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_25"&gt;reference&lt;/span&gt; to a web!");&lt;br /&gt;      //Or check for parent being a Web app or log it&lt;br /&gt;&lt;br /&gt;   // Do Stuff&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You get the idea! (I'll format the code as soon as I'm back on my normal PC)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1560006835189604679-3656626736012213030?l=johannes-prinz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-prinz.blogspot.com/feeds/3656626736012213030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://johannes-prinz.blogspot.com/2009/07/spfeaturereceiver-guidance.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/3656626736012213030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/3656626736012213030'/><link rel='alternate' type='text/html' href='http://johannes-prinz.blogspot.com/2009/07/spfeaturereceiver-guidance.html' title='SPFeatureReceiver Guidance'/><author><name>Johannes</name><uri>http://www.blogger.com/profile/08421785096317614420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_vEwOgvW8-CM/STMfqaSt5TI/AAAAAAAAAJs/5KJxgmVYiQA/S220/mo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1560006835189604679.post-7459266650896275007</id><published>2009-03-26T17:50:00.001+13:00</published><updated>2009-03-26T17:50:01.116+13:00</updated><title type='text'>HRESULT: 0x80040E2F the Why and How</title><content type='html'>&lt;p&gt;Just a quick update an why I was getting this error and how we fixed it. By WE I mean my bestest buddy ol' pal Angela Knight. Will post a link to her blog as soon as she starts one!&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;What it was is a custom Contentype that was based off the OOB Event ContentType with a bunch of custom SiteColumns where the offending SiteColumn was of type lookup. Problem was the custom ContenType was deployed to the SiteCollection level however the look up list was only provisioned at the web level.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;So how did Ange fix it?   &lt;br /&gt;She removed the offending SiteColumn, Created a Web level ContetType thats based off our custom ContentType that's provisioned after the look up list is. Thus we no longer get the error. See the juicy bits below.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt; ..oops.. out of time will update tomorrow &amp;lt;&amp;lt;such a tease&amp;gt;&amp;gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1560006835189604679-7459266650896275007?l=johannes-prinz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-prinz.blogspot.com/feeds/7459266650896275007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://johannes-prinz.blogspot.com/2009/03/hresult-0x80040e2f-why-and-how.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/7459266650896275007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/7459266650896275007'/><link rel='alternate' type='text/html' href='http://johannes-prinz.blogspot.com/2009/03/hresult-0x80040e2f-why-and-how.html' title='HRESULT: 0x80040E2F the Why and How'/><author><name>Johannes</name><uri>http://www.blogger.com/profile/08421785096317614420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_vEwOgvW8-CM/STMfqaSt5TI/AAAAAAAAAJs/5KJxgmVYiQA/S220/mo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1560006835189604679.post-7571382425247056620</id><published>2009-03-26T12:05:00.001+13:00</published><updated>2009-03-26T12:05:49.048+13:00</updated><title type='text'>Error Message of the day</title><content type='html'>&lt;p&gt;List does not exist &lt;/p&gt;  &lt;p&gt;The page you selected &lt;strong&gt;&lt;font color="#ff0000"&gt;contains&lt;/font&gt;&lt;/strong&gt; a list that does not exist.&amp;#160; It may have been deleted by another user.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1560006835189604679-7571382425247056620?l=johannes-prinz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-prinz.blogspot.com/feeds/7571382425247056620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://johannes-prinz.blogspot.com/2009/03/error-message-of-day.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/7571382425247056620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/7571382425247056620'/><link rel='alternate' type='text/html' href='http://johannes-prinz.blogspot.com/2009/03/error-message-of-day.html' title='Error Message of the day'/><author><name>Johannes</name><uri>http://www.blogger.com/profile/08421785096317614420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_vEwOgvW8-CM/STMfqaSt5TI/AAAAAAAAAJs/5KJxgmVYiQA/S220/mo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1560006835189604679.post-626496339510774854</id><published>2009-02-27T18:15:00.001+13:00</published><updated>2009-02-27T18:16:32.911+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Crawler'/><category scheme='http://www.blogger.com/atom/ns#' term='WPF'/><category scheme='http://www.blogger.com/atom/ns#' term='OOXML'/><category scheme='http://www.blogger.com/atom/ns#' term='PriorityQueue'/><title type='text'>Check out my OOXML Crawler</title><content type='html'>All the goodies are right &lt;a href="http://openxmldeveloper.org/articles/4179.aspx"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1560006835189604679-626496339510774854?l=johannes-prinz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-prinz.blogspot.com/feeds/626496339510774854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://johannes-prinz.blogspot.com/2009/02/check-out-my-ooxml-crawler.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/626496339510774854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/626496339510774854'/><link rel='alternate' type='text/html' href='http://johannes-prinz.blogspot.com/2009/02/check-out-my-ooxml-crawler.html' title='Check out my OOXML Crawler'/><author><name>Johannes</name><uri>http://www.blogger.com/profile/08421785096317614420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_vEwOgvW8-CM/STMfqaSt5TI/AAAAAAAAAJs/5KJxgmVYiQA/S220/mo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1560006835189604679.post-7122686607616693613</id><published>2009-02-17T15:58:00.002+13:00</published><updated>2010-02-05T08:40:47.385+13:00</updated><title type='text'>C# PriorityQueue&lt;T&gt; Implementation</title><content type='html'>Before I get any more abusive comments. This post is targeted at the 2.0 version of the Framework.&lt;br /&gt;&lt;p&gt;Guess I could of just used a SortedList&amp;lt;T1, T2&amp;gt; implementation in System.Collections.Generic, but I want a PriorityQueue&amp;lt;T&amp;gt;. So here goes.&lt;/p&gt;&lt;div style="BORDER-BOTTOM: gray 1px solid; BORDER-LEFT: gray 1px solid; PADDING-BOTTOM: 4px; LINE-HEIGHT: 12pt; PADDING-LEFT: 4px; WIDTH: 97.5%; PADDING-RIGHT: 4px; MAX-HEIGHT: 200px; OVERFLOW: auto; BORDER-TOP: gray 1px solid; CURSOR: text; BORDER-RIGHT: gray 1px solid; PADDING-TOP: 4px; BACKGROUND-: 20px 0px 10pxfont-family:consolas, 'Courier New', courier, monospace;font-size:8pt;color:#f4f4f4;"   &gt;&lt;pre style="BORDER-BOTTOM-STYLE: none; PADDING-BOTTOM: 0px; LINE-HEIGHT: 12pt; BORDER-RIGHT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; MARGIN: 0em; PADDING-LEFT: 0px; WIDTH: 100%; PADDING-RIGHT: 0px; BORDER-TOP-STYLE: none; BORDER-LEFT-STYLE: none; OVERFLOW: visiblefont-size:8pt;color:black;"  &gt;&lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; PriorityQueue&amp;lt;T&amp;gt; : SortedList&amp;lt;T, T&amp;gt;&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; PriorityQueue()&lt;br /&gt;        : &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;()&lt;br /&gt;    {&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; PriorityQueue(IComparer&amp;lt;T&amp;gt; comparer)&lt;br /&gt;        : &lt;span style="color:#0000ff;"&gt;base&lt;/span&gt;(comparer)&lt;br /&gt;    {&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;// Summary:&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//     Returns the object at the beginning of the System.Collections.Generic.Queue&amp;lt;T&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//     without removing it.&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;// Returns:&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//     The object at the beginning of the System.Collections.Generic.Queue&amp;lt;T&amp;gt;.&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;// Exceptions:&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//   System.InvalidOperationException:&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//     The System.Collections.Generic.Queue&amp;lt;T&amp;gt; is empty.&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; T Peek()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Last().Key;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;// Summary:&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//     Removes and returns the object at the beginning of the System.Collections.Generic.Queue&amp;lt;T&amp;gt;.&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;// Returns:&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//     The object that is removed from the beginning of the System.Collections.Generic.Queue&amp;lt;T&amp;gt;.&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;// Exceptions:&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//   System.InvalidOperationException:&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//     The System.Collections.Generic.Queue&amp;lt;T&amp;gt; is empty.&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; T Dequeue()&lt;br /&gt;    {&lt;br /&gt;        T item = &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Last().Key;&lt;br /&gt;        &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.RemoveAt(&lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Count - 1);&lt;br /&gt;        &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; item;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;// Summary:&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//     Adds an object to the end of the System.Collections.Generic.Queue&amp;lt;T&amp;gt;.&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;// Parameters:&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//   item:&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//     The object to add to the System.Collections.Generic.Queue&amp;lt;T&amp;gt;. The value can&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#008000;"&gt;//     be null for reference types.&lt;/span&gt;&lt;br /&gt;    &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; Enqueue(T item)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;.Add(item, item);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1560006835189604679-7122686607616693613?l=johannes-prinz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-prinz.blogspot.com/feeds/7122686607616693613/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://johannes-prinz.blogspot.com/2009/02/c-priorityqueue-implementation.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/7122686607616693613'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/7122686607616693613'/><link rel='alternate' type='text/html' href='http://johannes-prinz.blogspot.com/2009/02/c-priorityqueue-implementation.html' title='C# PriorityQueue&amp;lt;T&amp;gt; Implementation'/><author><name>Johannes</name><uri>http://www.blogger.com/profile/08421785096317614420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_vEwOgvW8-CM/STMfqaSt5TI/AAAAAAAAAJs/5KJxgmVYiQA/S220/mo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1560006835189604679.post-5015783511808960306</id><published>2009-01-26T13:19:00.003+13:00</published><updated>2009-01-26T13:21:52.322+13:00</updated><title type='text'>SharePoint and me</title><content type='html'>This about sums it up for me,&lt;br /&gt;&lt;br /&gt;&lt;a href="http://jonesie.net.nz/WhatIsWrongWithSharePoint.aspx"&gt;Peter Jone's "What Is Wrong With SharePoint"&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thank you Peter for an excellent analogy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1560006835189604679-5015783511808960306?l=johannes-prinz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-prinz.blogspot.com/feeds/5015783511808960306/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://johannes-prinz.blogspot.com/2009/01/sharepoint-and-me.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/5015783511808960306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/5015783511808960306'/><link rel='alternate' type='text/html' href='http://johannes-prinz.blogspot.com/2009/01/sharepoint-and-me.html' title='SharePoint and me'/><author><name>Johannes</name><uri>http://www.blogger.com/profile/08421785096317614420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_vEwOgvW8-CM/STMfqaSt5TI/AAAAAAAAAJs/5KJxgmVYiQA/S220/mo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1560006835189604679.post-5217514532953144011</id><published>2009-01-15T15:42:00.002+13:00</published><updated>2009-01-15T15:50:36.311+13:00</updated><title type='text'>HRESULT: 0x80040E2F Why Me?</title><content type='html'>&lt;p&gt;   &lt;/p&gt;&lt;p&gt;How did it happen? &lt;/p&gt;    &lt;p&gt;I tried to edit an existing SPListItem through the Web UI.&lt;/p&gt; &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_vEwOgvW8-CM/SW6iqoR9_sI/AAAAAAAAAKQ/VgH2zksly-g/image%5B2%5D.png"&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/_vEwOgvW8-CM/SW6iqoR9_sI/AAAAAAAAAKQ/VgH2zksly-g/image%5B2%5D.png"&gt;&lt;img style="border: 0px none ;" alt="image" src="http://lh3.ggpht.com/_vEwOgvW8-CM/SW6irT_LivI/AAAAAAAAAKU/22QjMIT5PJc/image_thumb.png" border="0" height="131" width="244" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;   &lt;/p&gt;&lt;p&gt;What now?    &lt;br /&gt;I reach for my search bar and find blah blah Violation of PRIMARY KEY constraint blah Backup blah Restore. &lt;/p&gt;    &lt;p&gt;Shouldn't the API gracefully handle such an error?    &lt;br /&gt;Time to dig through the logs.     &lt;br /&gt;Event logs say nada but I found the following in SharePoint logs.&lt;/p&gt; &lt;p&gt;&lt;/p&gt;  &lt;div style="border: 1px solid gray; margin: 20px 0px 10px; padding: 4px; overflow: auto; font-size: 8pt; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;   &lt;div style="border-style: none; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;     &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;01/13/2009 14:09:52.60     w3wp.exe (0x1670)                           0x1458    Windows SharePoint Services       General                           0    Verbose     Releasing SPRequest with allocation Id {87F373C4-DE0E-4294-8012-85AF991E4A7F}     &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;   &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;01/13/2009 14:09:52.65     w3wp.exe (0x1670)                           0x1458    Windows SharePoint Services       Database                          6f8g    Unexpected    Unexpected query execution failure, error code 3621. Additional error information from SQL Server is included below. "The statement has been terminated." Query text (if available): "BEGIN TRAN;DECLARE @@iRet INT,@DN nvarchar(256),@LN nvarchar(128),@@S uniqueidentifier,@@Level tinyint,@@DocUIVersion int,@ExtraItemSize bigint;SET @@iRet = 0;SET @@S='73897537-074B-404A-B7FF-814BEF2D21C8';SET @@Level=1;SET @@DocUIVersion = 512;SELECT @ExtraItemSize = 0  EXEC @@iRet = proc_UpdateListItem @SiteId='73897537-074B-404A-B7FF-814BEF2D21C8',@WebId='71DC2E37-8A9D-4FDC-A504-6AA845885ABC', @ListID = '2446D5BB-34F8-4366-8839-B13CB55D24D0', @ItemID=2, @RowOrdinal = 0,@ReturnRowset = 1,@ItemDirName=@DN OUTPUT,@ItemLeafName=@LN OUTPUT,@UserId=2,@TimeNow = '20090113 01:09:52',@MajorVersionsLimit=0,@MajorMinor...     &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;   &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;tabase                          6f8g    Unexpected    Unexpected query execution failure, error code 3621. Additional error information from SQL Server is included below. "The statement has been terminated." Query text (if available): "BEGIN TRAN;DECLARE @@iRet INT,@DN nvarchar(256),@LN nvarchar(128),@@S uniqueidentifier,@@Level tinyint,@@DocUIVersion int,@ExtraItemSize bigint;SET @@iRet = 0;SET @@S='73897537-074B-404A-B7FF-814BEF2D21C8';SET @@Level=1;SET @@DocUIVersion = 512;SELECT @ExtraItemSize = 0  EXEC @@iRet = proc_UpdateListItem @SiteId='73897537-074B-404A-B7FF-814BEF2D21C8',@WebId='71DC2E37-8A9D-4FDC-A504-6AA845885ABC', @ListID = '2446D5BB-34F8-4366-8839-B13CB55D24D0', @ItemID=2, @RowOrdinal = 0,@ReturnRowset = 1,@ItemDirName=@DN OUTPUT,@ItemLeafName=@LN OUTPUT,@UserId=2,@TimeNow = '20090113 01:09:52',@MajorVersionsLimit=0,@MajorMinor...     &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;   &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;01/13/2009 14:09:52.65*    w3wp.exe (0x1670)                           0x1458    Windows SharePoint Services       Database                          6f8g    Unexpected    ...VersionsLimit=0, @NewUIVersion = @@DocUIVersion OUTPUT,@Level=@@Level OUTPUT,@IsDocLib=0, @tp_Version = 4, @tp_ContentTypeId = ?, @nvarchar1 = ?, @uniqueidentifier1 = ?, @ntext2 = ?, @nvarchar3 = ?, @nvarchar4 = ?, @nvarchar5 = ?, @datetime1 = ?, @datetime2 = ?, @bit1 = ?, @nvarchar6 = ?, @ntext3 = ?, @nvarchar7 = ?, @nvarchar9 = ?, @bit3 = ?, @nvarchar10 = ?, @ntext4 = ?, @bit4 = ?, @nvarchar11 = ?, @int2 = ?, @int3 = ?, @ntext5 = ?, @int4 = ?, @ntext7 = ?, @nvarchar14 = ?, @ntext8 = ?, @nvarchar15 = ?, @nvarchar16 = ?, @nvarchar17 = ?, @nvarchar18 = ?, @ntext9 = ?, @nvarchar19 = ?, @nvarchar20 = ?, @nvarchar21 = ?, @tp_ContentType = ?, @tp_Modified = ?, @tp_ModerationStatus = ?, @tp_ItemOrder = 200.000000000000, @Size = 720, @ExtraItemSize = @ExtraItemSize ,@CreateItemVersion=1,@ItemName...     &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;   &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt;01/13/2009 14:09:52.65*    w3wp.exe (0x1670)                           0x1458    Windows SharePoint Services       Database                          6f8g    Unexpected    ...=N'2 ,jnkj hgh jk',@acl=0xF3FE000001000000000000000500000002000000FFFFFFFFFFFFFF7F190000006110030C000000001A0000007713830CB00100001B0000007713830CB00100001C0000007713830CB0010000; IF @@iRet &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&amp;gt;&lt;/span&gt; 0 BEGIN ROLLBACK TRAN; GOTO DONE; END   EXEC @@iRet = proc_RemoveJunctions  @SiteId = '73897537-074B-404A-B7FF-814BEF2D21C8', @DirName = @DN, @LeafName = @LN, @FieldId = '6D58D11E-56A7-48B6-94CC-4F4509383ABA', @Level = @@Level; IF @@iRet &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&amp;gt;&lt;/span&gt; 0 BEGIN ROLLBACK TRAN; GOTO DONE; END   EXEC @@iRet = proc_InsertJunction  @SiteId = '73897537-074B-404A-B7FF-814BEF2D21C8', @DirName = @DN, @LeafName = @LN, @FieldId = '6D58D11E-56A7-48B6-94CC-4F4509383ABA', @Id = 1, @Ordinal = 0, @Level = @@Level, @UIVersion = @@DocUIVersion; IF @@iRet &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&amp;gt;&lt;/span&gt; 0 BEGIN ROLLBACK TRAN; GOTO DONE; END  EXEC proc_ClearLinks @@S,@DN,@LN,@@...     &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;   &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: white;"&gt;01/13/2009 14:09:52.65*    w3wp.exe (0x1670)                           0x1458    Windows SharePoint Services       Database                          6f8g    Unexpected    ...Level,'9DA97A8A-1DA5-4A77-98D3-4BC10456E700'; EXEC proc_ClearLinks @@S,@DN,@LN,@@Level,'D48838AB-DFC6-466C-9CA1-24D035222458'; EXEC proc_ClearLinks @@S,@DN,@LN,@@Level,'53EFC938-7A3C-4189-BE2B-DC0A170F3CF4'; EXEC proc_ClearLinks @@S,@DN,@LN,@@Level,'D12572D0-0A1E-4438-89B5-4D0430BE7603'; EXEC proc_ClearLinks @@S,@DN,@LN,@@Level,'1D15282F-976B-44C7-B2F5-614AFBA80CCF'; EXEC proc_ClearLinks @@S,@DN,@LN,@@Level,'33FB1043-4DE8-483F-A6C6-42E02EDB42ED'; EXEC proc_ClearLinks @@S,@DN,@LN,@@Level,'4A7EDDD9-8639-4734-B3A7-2A5446605547'; COMMIT TRAN; DONE: RETURN;"     &lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;   &lt;pre style="border-style: none; margin: 0em; padding: 0px; overflow: visible; font-size: 8pt; width: 100%; color: black; line-height: 12pt; font-family: consolas,'Courier New',courier,monospace; background-color: rgb(244, 244, 244);"&gt; &lt;/pre&gt;&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;&lt;/div&gt;In here I saw the SQL Error Code 3621 which pretty much says "The statement has been terminated."&lt;br /&gt;&lt;p&gt;&lt;/p&gt;Normally I wouldn't be so worried but in this case it now happens a lot with separate items in this list.&lt;br /&gt;&lt;p&gt;    Thinking maybe something has become corrupted I've tried a stsadm -o backup and restore into a fresh site collection in a fresh web application using a fresh content database, but hey the issue has been restored into the new site collection.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;Any help and or suggestion would be greatly appreciated, what a way to start the new year at work.&lt;br /&gt;&lt;br /&gt;On a great note my holiday was "O" for awesome! Chur Chur.&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1560006835189604679-5217514532953144011?l=johannes-prinz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-prinz.blogspot.com/feeds/5217514532953144011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://johannes-prinz.blogspot.com/2009/01/hresult-0x80040e2f-why-me.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/5217514532953144011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/5217514532953144011'/><link rel='alternate' type='text/html' href='http://johannes-prinz.blogspot.com/2009/01/hresult-0x80040e2f-why-me.html' title='HRESULT: 0x80040E2F Why Me?'/><author><name>Johannes</name><uri>http://www.blogger.com/profile/08421785096317614420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_vEwOgvW8-CM/STMfqaSt5TI/AAAAAAAAAJs/5KJxgmVYiQA/S220/mo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_vEwOgvW8-CM/SW6irT_LivI/AAAAAAAAAKU/22QjMIT5PJc/s72-c/image_thumb.png' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1560006835189604679.post-6793980074706902962</id><published>2008-12-04T08:30:00.003+13:00</published><updated>2008-12-04T08:36:17.043+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sample Code'/><category scheme='http://www.blogger.com/atom/ns#' term='Exchange'/><category scheme='http://www.blogger.com/atom/ns#' term='ExchangeWebService'/><category scheme='http://www.blogger.com/atom/ns#' term='Book'/><category scheme='http://www.blogger.com/atom/ns#' term='EWS'/><title type='text'>Working with Exchange Web Services</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.microsoft.com/MSPress/books/imgt/10724.gif"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 130px; height: 130px;" src="http://www.microsoft.com/MSPress/books/imgt/10724.gif" border="0" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;Before you even start working with any of the EWS make sure you get your hands on a copy of  Inside Microsoft® Exchange Server 2007 Web Services by David Sterling; Benjamin Spain; Michael Mainer; Mark Taylor; Huw Upshall.&lt;br /&gt;Or at least get the sample code for it from &lt;a href="http://go.microsoft.com/fwlink/?LinkId=104740"&gt;here&lt;/a&gt;.&lt;br /&gt;This book has explained many things especially around working with the UpdateItem call and Exchange Impersonation and the double hop problem with Kerberos Authentication.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1560006835189604679-6793980074706902962?l=johannes-prinz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-prinz.blogspot.com/feeds/6793980074706902962/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://johannes-prinz.blogspot.com/2008/12/working-with-exchange-web-services.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/6793980074706902962'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/6793980074706902962'/><link rel='alternate' type='text/html' href='http://johannes-prinz.blogspot.com/2008/12/working-with-exchange-web-services.html' title='Working with Exchange Web Services'/><author><name>Johannes</name><uri>http://www.blogger.com/profile/08421785096317614420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_vEwOgvW8-CM/STMfqaSt5TI/AAAAAAAAAJs/5KJxgmVYiQA/S220/mo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1560006835189604679.post-3442638930562730286</id><published>2008-12-02T16:06:00.005+13:00</published><updated>2008-12-03T15:05:44.878+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Update'/><category scheme='http://www.blogger.com/atom/ns#' term='ExchangeWebService'/><category scheme='http://www.blogger.com/atom/ns#' term='EWS'/><category scheme='http://www.blogger.com/atom/ns#' term='CalendarItemType'/><title type='text'>My ExchangeServiceBinding.UpdateItem Method Wrapper for Calendar Items</title><content type='html'>Anyone who's tried to update an item in Exchange using Exchange Web Service (EWS) has felt the pain of the update method. Here is my wrapper as it is today. Will update this as I get more properties I need to update.  &lt;br /&gt;  &lt;br /&gt;  &lt;div class="csharpcode-wrapper"&gt;   &lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;/// Updates the calendar item.&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;binding&amp;quot;&amp;gt;The binding.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;/// &amp;lt;param name=&amp;quot;appointment&amp;quot;&amp;gt;The appointment.&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="rem"&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; ItemIdType UpdateCalendarItem(&lt;br /&gt;    ExchangeServiceBinding binding,&lt;br /&gt;    CalendarItemType appointment)&lt;br /&gt;{&lt;br /&gt;    &lt;span class="rem"&gt;//Category&lt;/span&gt;&lt;br /&gt;    SetItemFieldType categoryUpdate = &lt;span class="kwrd"&gt;new&lt;/span&gt; SetItemFieldType();&lt;br /&gt;    categoryUpdate.Item = &lt;span class="kwrd"&gt;new&lt;/span&gt; PathToUnindexedFieldType();&lt;br /&gt;    ((PathToUnindexedFieldType)categoryUpdate.Item).FieldURI = UnindexedFieldURIType.itemCategories;&lt;br /&gt;    categoryUpdate.Item1 = &lt;span class="kwrd"&gt;new&lt;/span&gt; CalendarItemType();&lt;br /&gt;    ((CalendarItemType)categoryUpdate.Item1).Categories = appointment.Categories;&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;//Sensitivity&lt;/span&gt;&lt;br /&gt;    SetItemFieldType sensitivityUpdate = &lt;span class="kwrd"&gt;new&lt;/span&gt; SetItemFieldType();&lt;br /&gt;    sensitivityUpdate.Item = &lt;span class="kwrd"&gt;new&lt;/span&gt; PathToUnindexedFieldType();&lt;br /&gt;    ((PathToUnindexedFieldType)sensitivityUpdate.Item).FieldURI = UnindexedFieldURIType.itemSensitivity;&lt;br /&gt;    sensitivityUpdate.Item1 = &lt;span class="kwrd"&gt;new&lt;/span&gt; CalendarItemType();&lt;br /&gt;    ((CalendarItemType)sensitivityUpdate.Item1).Sensitivity = appointment.Sensitivity;&lt;br /&gt;    ((CalendarItemType)sensitivityUpdate.Item1).SensitivitySpecified = appointment.SensitivitySpecified;&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;//Subject&lt;/span&gt;&lt;br /&gt;    SetItemFieldType subjectUpdate = &lt;span class="kwrd"&gt;new&lt;/span&gt; SetItemFieldType();&lt;br /&gt;    subjectUpdate.Item = &lt;span class="kwrd"&gt;new&lt;/span&gt; PathToUnindexedFieldType();&lt;br /&gt;    ((PathToUnindexedFieldType)subjectUpdate.Item).FieldURI = UnindexedFieldURIType.itemSubject;&lt;br /&gt;    subjectUpdate.Item1 = &lt;span class="kwrd"&gt;new&lt;/span&gt; CalendarItemType();&lt;br /&gt;    ((CalendarItemType)subjectUpdate.Item1).Subject = appointment.Subject;&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;//Location&lt;/span&gt;&lt;br /&gt;    SetItemFieldType locationUpdate = &lt;span class="kwrd"&gt;new&lt;/span&gt; SetItemFieldType();&lt;br /&gt;    locationUpdate.Item = &lt;span class="kwrd"&gt;new&lt;/span&gt; PathToUnindexedFieldType();&lt;br /&gt;    ((PathToUnindexedFieldType)locationUpdate.Item).FieldURI = UnindexedFieldURIType.calendarLocation;&lt;br /&gt;    locationUpdate.Item1 = &lt;span class="kwrd"&gt;new&lt;/span&gt; CalendarItemType();&lt;br /&gt;    ((CalendarItemType)locationUpdate.Item1).Location = appointment.Location;&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;//Start&lt;/span&gt;&lt;br /&gt;    SetItemFieldType startUpdate = &lt;span class="kwrd"&gt;new&lt;/span&gt; SetItemFieldType();&lt;br /&gt;    startUpdate.Item = &lt;span class="kwrd"&gt;new&lt;/span&gt; PathToUnindexedFieldType();&lt;br /&gt;    ((PathToUnindexedFieldType)startUpdate.Item).FieldURI = UnindexedFieldURIType.calendarStart;&lt;br /&gt;    startUpdate.Item1 = &lt;span class="kwrd"&gt;new&lt;/span&gt; CalendarItemType();&lt;br /&gt;    ((CalendarItemType)startUpdate.Item1).Start = appointment.Start;&lt;br /&gt;    ((CalendarItemType)startUpdate.Item1).StartSpecified = appointment.StartSpecified;&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;//End&lt;/span&gt;&lt;br /&gt;    SetItemFieldType endUpdate = &lt;span class="kwrd"&gt;new&lt;/span&gt; SetItemFieldType();&lt;br /&gt;    endUpdate.Item = &lt;span class="kwrd"&gt;new&lt;/span&gt; PathToUnindexedFieldType();&lt;br /&gt;    ((PathToUnindexedFieldType)endUpdate.Item).FieldURI = UnindexedFieldURIType.calendarEnd;&lt;br /&gt;    endUpdate.Item1 = &lt;span class="kwrd"&gt;new&lt;/span&gt; CalendarItemType();&lt;br /&gt;    ((CalendarItemType)endUpdate.Item1).End = appointment.End;&lt;br /&gt;    ((CalendarItemType)endUpdate.Item1).EndSpecified = appointment.EndSpecified;&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;//IsAllDayEvent&lt;/span&gt;&lt;br /&gt;    SetItemFieldType isAllDayEventUpdate = &lt;span class="kwrd"&gt;new&lt;/span&gt; SetItemFieldType();&lt;br /&gt;    isAllDayEventUpdate.Item = &lt;span class="kwrd"&gt;new&lt;/span&gt; PathToUnindexedFieldType();&lt;br /&gt;    ((PathToUnindexedFieldType)isAllDayEventUpdate.Item).FieldURI = UnindexedFieldURIType.calendarIsAllDayEvent;&lt;br /&gt;    isAllDayEventUpdate.Item1 = &lt;span class="kwrd"&gt;new&lt;/span&gt; CalendarItemType();&lt;br /&gt;    ((CalendarItemType)isAllDayEventUpdate.Item1).IsAllDayEvent = appointment.IsAllDayEvent;&lt;br /&gt;    ((CalendarItemType)isAllDayEventUpdate.Item1).IsAllDayEventSpecified = appointment.IsAllDayEventSpecified;&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;//Body&lt;/span&gt;&lt;br /&gt;    SetItemFieldType bodyUpdate = &lt;span class="kwrd"&gt;new&lt;/span&gt; SetItemFieldType();&lt;br /&gt;    bodyUpdate.Item = &lt;span class="kwrd"&gt;new&lt;/span&gt; PathToUnindexedFieldType();&lt;br /&gt;    ((PathToUnindexedFieldType)bodyUpdate.Item).FieldURI = UnindexedFieldURIType.itemBody;&lt;br /&gt;    bodyUpdate.Item1 = &lt;span class="kwrd"&gt;new&lt;/span&gt; CalendarItemType();&lt;br /&gt;    ((CalendarItemType)bodyUpdate.Item1).Body = appointment.Body;&lt;br /&gt;&lt;br /&gt;    ItemChangeType changes = &lt;span class="kwrd"&gt;new&lt;/span&gt; ItemChangeType();&lt;br /&gt;    changes.Item = appointment.ItemId;&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (appointment.Recurrence != &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="rem"&gt;//Recurrence&lt;/span&gt;&lt;br /&gt;        SetItemFieldType recurrenceUpdate = &lt;span class="kwrd"&gt;new&lt;/span&gt; SetItemFieldType();&lt;br /&gt;        recurrenceUpdate.Item = &lt;span class="kwrd"&gt;new&lt;/span&gt; PathToUnindexedFieldType();&lt;br /&gt;        ((PathToUnindexedFieldType)recurrenceUpdate.Item).FieldURI = UnindexedFieldURIType.calendarRecurrence;&lt;br /&gt;        recurrenceUpdate.Item1 = &lt;span class="kwrd"&gt;new&lt;/span&gt; CalendarItemType();&lt;br /&gt;        ((CalendarItemType)recurrenceUpdate.Item1).Recurrence = appointment.Recurrence;&lt;br /&gt;&lt;br /&gt;        changes.Updates = &lt;span class="kwrd"&gt;new&lt;/span&gt; ItemChangeDescriptionType[] { &lt;br /&gt;    categoryUpdate, &lt;br /&gt;    sensitivityUpdate, &lt;br /&gt;    subjectUpdate, &lt;br /&gt;    locationUpdate, &lt;br /&gt;    startUpdate, &lt;br /&gt;    endUpdate, &lt;br /&gt;    isAllDayEventUpdate, &lt;br /&gt;    bodyUpdate, &lt;br /&gt;    recurrenceUpdate };&lt;br /&gt;    }&lt;br /&gt;    &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;br /&gt;    {&lt;br /&gt;        changes.Updates = &lt;span class="kwrd"&gt;new&lt;/span&gt; ItemChangeDescriptionType[] { &lt;br /&gt;    categoryUpdate, &lt;br /&gt;    sensitivityUpdate, &lt;br /&gt;    subjectUpdate, &lt;br /&gt;    locationUpdate, &lt;br /&gt;    startUpdate, &lt;br /&gt;    endUpdate, &lt;br /&gt;    isAllDayEventUpdate, &lt;br /&gt;    bodyUpdate };&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    UpdateItemType request = &lt;span class="kwrd"&gt;new&lt;/span&gt; UpdateItemType();&lt;br /&gt;    request.ConflictResolution = ConflictResolutionType.AlwaysOverwrite;&lt;br /&gt;    request.MessageDisposition = MessageDispositionType.SaveOnly;&lt;br /&gt;    request.SendMeetingInvitationsOrCancellations = CalendarItemUpdateOperationType.SendToNone;&lt;br /&gt;    request.SendMeetingInvitationsOrCancellationsSpecified = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;br /&gt;    request.ConflictResolution = ConflictResolutionType.AutoResolve;&lt;br /&gt;&lt;br /&gt;    request.ItemChanges = &lt;span class="kwrd"&gt;new&lt;/span&gt; ItemChangeType[] { changes };&lt;br /&gt;&lt;br /&gt;    UpdateItemResponseType response = binding.UpdateItem(request);&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;// Verify that the UpdateItem request was successful&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (response.ResponseMessages.Items[0].ResponseClass !=&lt;br /&gt;        ResponseClassType.Success)&lt;br /&gt;    {&lt;br /&gt;        &lt;span class="rem"&gt;// Indicate that we have a problem&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; SyncFailedException(String.Format(&lt;br /&gt;            &lt;span class="str"&gt;&amp;quot;Unable to update occurence\r\n{0}\r\n{1}\r\n{2}&amp;quot;&lt;/span&gt;,&lt;br /&gt;            response.ResponseMessages.Items[0].ResponseCode,&lt;br /&gt;            response.ResponseMessages.Items[0].MessageText,&lt;br /&gt;            Serializer.SerializeObject&amp;lt;UpdateItemType&amp;gt;(request)));&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span class="rem"&gt;// Success, get the new id of the recurring master&lt;/span&gt;&lt;br /&gt;    ItemInfoResponseMessageType itemInfoResponseMessage =&lt;br /&gt;        (ItemInfoResponseMessageType)response.ResponseMessages.Items[0];&lt;br /&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; itemInfoResponseMessage.Items.Items[0].ItemId;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1560006835189604679-3442638930562730286?l=johannes-prinz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-prinz.blogspot.com/feeds/3442638930562730286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://johannes-prinz.blogspot.com/2008/12/my-exchangeservicebindingupdateitem.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/3442638930562730286'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/3442638930562730286'/><link rel='alternate' type='text/html' href='http://johannes-prinz.blogspot.com/2008/12/my-exchangeservicebindingupdateitem.html' title='My ExchangeServiceBinding.UpdateItem Method Wrapper for Calendar Items'/><author><name>Johannes</name><uri>http://www.blogger.com/profile/08421785096317614420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_vEwOgvW8-CM/STMfqaSt5TI/AAAAAAAAAJs/5KJxgmVYiQA/S220/mo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1560006835189604679.post-1348687184425963249</id><published>2008-12-01T20:32:00.006+13:00</published><updated>2008-12-03T09:57:23.111+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><category scheme='http://www.blogger.com/atom/ns#' term='Query'/><category scheme='http://www.blogger.com/atom/ns#' term='CAML'/><title type='text'>CAML Queries in SharePoint</title><content type='html'>There we go. ot even one day into it and I have my first blunder to talk about. I've been using CAML Queries in SharePoint or a while now, they are fast and really easy t use ........ well if you using something like &lt;a href="http://www.u2u.info/Blogs/Patrick/Lists/Posts/Post.aspx?ID=1315"&gt;CAML Query Builder.&lt;/a&gt;&lt;br /&gt;No idea how many times I've used this now but today it had me stumped. I used it to build me a querry, which I tested and everything worked great ..... until I put it in my code. The it suddenly just returned everything in the list I was running the query on. This took me almost 30 minutes to and another set of eyes to solve.&lt;br /&gt;Huge &lt;span style="font-weight: bold;"&gt;FYI&lt;/span&gt; everyone, when ya copy the query string out of CAML Query Builder &lt;span style="font-weight: bold;"&gt;DO NOT&lt;/span&gt; copy the &amp;lt;query&amp;gt; &amp;lt;\query&amp;gt; tags and the start and end.&lt;br /&gt;&lt;br /&gt;Ok you can laugh at me now :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1560006835189604679-1348687184425963249?l=johannes-prinz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-prinz.blogspot.com/feeds/1348687184425963249/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://johannes-prinz.blogspot.com/2008/12/caml-queries-in-sharepoint.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/1348687184425963249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/1348687184425963249'/><link rel='alternate' type='text/html' href='http://johannes-prinz.blogspot.com/2008/12/caml-queries-in-sharepoint.html' title='CAML Queries in SharePoint'/><author><name>Johannes</name><uri>http://www.blogger.com/profile/08421785096317614420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_vEwOgvW8-CM/STMfqaSt5TI/AAAAAAAAAJs/5KJxgmVYiQA/S220/mo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1560006835189604679.post-5325621405456892175</id><published>2008-12-01T12:29:00.000+13:00</published><updated>2008-12-01T12:36:22.463+13:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SharePoint'/><category scheme='http://www.blogger.com/atom/ns#' term='Rant'/><category scheme='http://www.blogger.com/atom/ns#' term='Exchange'/><title type='text'>What I come across at work!</title><content type='html'>Hi all,&lt;br /&gt;Ever since I've started working at &lt;a href="http://www.intergen.co.nz/"&gt;Intergen&lt;/a&gt;, I've been learning a tonne. But on my current project I've been coming across some issues that have been so frustrating I'm starting to question my career as a developer.&lt;br /&gt;Don't get me wrong, I love a challenge but I wouldn't wish this sorta frustration on anyone so in an effort to make this a better world I will share with you everything I find out. From now on anyways :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1560006835189604679-5325621405456892175?l=johannes-prinz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://johannes-prinz.blogspot.com/feeds/5325621405456892175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://johannes-prinz.blogspot.com/2008/11/what-i-come-across-at-work.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/5325621405456892175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1560006835189604679/posts/default/5325621405456892175'/><link rel='alternate' type='text/html' href='http://johannes-prinz.blogspot.com/2008/11/what-i-come-across-at-work.html' title='What I come across at work!'/><author><name>Johannes</name><uri>http://www.blogger.com/profile/08421785096317614420</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_vEwOgvW8-CM/STMfqaSt5TI/AAAAAAAAAJs/5KJxgmVYiQA/S220/mo.jpg'/></author><thr:total>0</thr:total></entry></feed>
