Litte Watson .. Data Warehouse??

By jwmiller5 at February 13, 2012 20:59
Filed Under: Articles, DynamicData, Windows Phone

In developing apps for Windows Phone, I’ve been using the Northern Lights code library which includes Little Watson; a library for packaging exceptions and sending them to a http listener. The demo application uses a php page to send an email. Scott Hanselman’s inaugural WP7 post has him doing the same thing with an EmailComposeTask. Deep down, I’m a numbers nerd though, so culling through email to determine trends and statistics isn’t going to work for me. So I’ve created a ASP.NET webform that writes to a database. Not a huge deal, but when combined with ASP.NET dynamic data, I’ve got a live bug collection system that I can cull and extend as my needs grow more elaborate. I’ve setup three applications using this approach now, and it’s working pretty well for me.

 

 

To get this working for you, you’ll need to

 

  1. Create a new Dynamic Data website (or add dynamic data features to an existing website).
  2. Create a WatsonException entity that has the properties of the ExceptionContainer. I’m using Message, StackTrace, App Name, App Version, ExceptionRecordedDateTime.
  3. Create a webpage that LittleWatson can send an HTTP post to. All of the exception data will be encoded in a variable called Exception. The Application Name is not included in the post, so I am creating a separate listener for each application.
  4. In the webpage, save the exception data to the WatsonException context.

 

For me, this was another situation where a dynamic data website let me quickly deal with the incoming data on my terms, not letting this exception data clog my inbox. This also has the added benefit of requiring no user interaction, which makes it more likely that these reports will be submitted. If you choose to go down this route, there are two other items I would encourage you to remember.

 

The library uses a network connection to send the error reports (obviously). This means that your app needs to have the ID_CAP_NETWORKING or your error code won’t work. Just add it now, to save yourself the drama.

Programmatically Create Retention Schedules

By jwmiller5 at January 19, 2012 09:05
Filed Under: Articles, SharePoint2010

Let’s suppose you are migrating from an existing Records Management solution to Records Center in SharePoint 2010 to manage your records retention and disposition. How do you import and/or create your existing file plan in SharePoint? The Microsoft.Office.RecordsManagement.InformationPolicy assembly that ships with SharePoint Server 2010 has some methods to help you.

 

  1. If you are enforcing policy based on library and/or folder, you would use ListPolicySettings.SetRetentionSchedule provided by SharePoint 2010.
  2. If you are using Content Types to enforce your retention schedule, then you would use Policy.CreatePolicy on the Content Type and put your retentionXml in the CustomData of the PolicyItem.

 

When you read through the msdn article, it is unclear exactly how to construct the retentionXml parameter to provide a retention threshold/duration/activity. A sample retentionXml fragment that will start a workflow ten years after a document is created is included below. Another great blog post that outlines how to define custom expiration formulas and activities (as well as more xmlRetention samples) is available as well.

 

<Schedules nextStageId="2" default="false">

   <Schedule type="Default">

      <stages />

   </Schedule>

   <Schedule type="Record">

      <stages>

         <data stageId="1"><formula id="Microsoft.Office.RecordsManagement.PolicyFeatures.Expiration.Formula.BuiltIn">

            <number>10</number>

            <property>Created</property>

            <propertyId>8c06beca-0777-48f7-91c7-6da68bc07b69</propertyId>

            <period>years</period></formula>

            <action type="workflow" id="3b3dc6ae-283f-4455-a156-175dd2fa87e9" />

         </data>

      </stages>

   </Schedule>

</Schedules>

SharePoint 2010 October CU fails to configure

By jwmiller5 at January 04, 2012 12:15
Filed Under: Articles, SharePoint2010

I was recently patching some servers when I ran into an issue with the October 2011 Cumulative Update updating on all of the servers. It would get to 17% and fail. When I looked in the Event Logs, there was an error from SPUpgradeJobDefinition that has some standard text followed by localStoragePath. This is a new one for me, but after looking around a little bit, I found this article that describes the problem. Sure enough, the search topology was throwing errors. We deleted the SSA and reran psconfig and it ran through with no errrors.

This was a reminder to me that there is a defined process for patching and upgrading SharePoint, and I had skipped “Document the environment”. If I had taken the time to review the environment before getting started, I would have seen this error and fixed it before I got started. So review the process, learn it, love it, and live it.