June 2005 - Posts

CruiseControl.NET adds complete support for SourceGear Vault
28 June 05 01:20 PM | madsn | with no comments

Cool stuff. As of two days ago with the 0.9.2 release of CCNET SourceGear Vault is now completely supported! This means that labelling and autogetsource is in place and finally VSS has no advantage over Vault with CCNET any more. Another very cool new feature is the UserFilter functionality which allows you to prevent the build from triggering on certain conditions. This allows you to change stuff in your solution items without triggering the build, among other things.

Looking forward to upgrade our buildserver with this release.

Get started with VSTO for Outlook
24 June 05 09:47 AM | madsn | with no comments

Objectware AS has participated in the alpha and beta program for the Visual Studio Tools for Office for Outlook. I figured that this beta is something a lot of people wants to have a look at in the calm times of summer, and started googling to dig up som tutorials, introductions and howtos on more advanced subjects.

Unfortunately right now you'll end up with a million blogposts on the release of the beta, and very little real content. I've compiled what I've found here, and please feel free to comment with more real in-depth resources on VSTO for Outlook to ease adoption for newcomers.

I'll soon post some more stuff on my VSTO Outlook addin for storing mail in Sharepoint Document Libraries so stay tuned.

InfoPath says "Reference to undeclared namespace prefix" when changing view in the designer
23 June 05 05:35 PM | madsn | with no comments

For some reason InfoPath 2003 SP1 told me I had a "Reference to undeclared namespace prefix" in one of my views after I added a node from deep within my message schema.

The namespace in question was indeed declared in the schema (which is valid), but for some reason it was not included in the XSL generated by InfoPath. I extracted the form files (from the File Menu) appended the missing namespace in the xsl file for the view and it got going again.

Filed under:
COM objects need tight leash
22 June 05 10:48 AM | madsn | 6 comment(s)

When a customer suddenly reports memoryusage on their Sharepoint Server of 300mb increase an hour you tend to show up pretty quick.

This happened yesterday. After having installed a range of updates and patches to their server software, something in the w3wp process caused extensive memoryusage, eventually causing the process to terminate. According to the customer the process seemed to terminate (and recycle) at about 370mb, but after installing the latest Microsoft Office updates the memory grew all the way up to the maximum configured limit of 800mb.

I started analyzing the applications running under the w3wp process and got great help from the .NET Memory Profiler from Scitech. My initial hunch was that one or more of the COM interop parts of the solution was to blame.

After locating the varous COM classes indirectly involved in the Sharepoint / ASP.NET solutions running under the w3wp process the profiler showed that one of the COM objects was instantiated in large numbers in high frequencies. My guess was that the .NET Garbage Collector was cleaning up the managed references (the runtime callable wrapper - RCW) but not the COM objects themselves. I've seen this earlier in working with the Sharepoint object model and the Office Interop components.

The solution was to ensure a real cleanup after the use of the RCWs like this (updated to reflect my actual non-simplified implementation):

COMInteropComponent.RCWClass rcw = null;


try
{

   rcw = new COMInteropComponent.RCWClass()

   // Do some work with the rcw object
   rcw.DoSomeWork();

}
finally
{
   // Clean up COM
   if(rcw != null)
   {
      while(Marshal.ReleaseComObject(rcw) != 0){}

      // Set null and let the GC handle the managed reference
      rcw = null;
   }
}

This stopped the memory leak and the server has been running with stable memoryusage for more than 12 hrs. The reason why the use of this component started causing a memory leak only after patching up the server is not known, but anyways the moral of the story is to always handle unmanaged references with care.

VSTO for Outlook just died. Ressurect please.
20 June 05 11:41 AM | madsn | 3 comment(s)

Well, just died is actually a bit inaccurate. My Visual Studio Tools for Office Outlook solution stopped working friday, just about 10 minutes before I was supposed to hand it over to the customer.

When starting the project in debug mode nothing happened. The addin was displayed int the COM Add-Ins section in Outlook, but was unchecked. When I tried to check the addin Outllook simply unchecked it for me again. This of course lead me through the entire VSTO architecture trying to figure out what was wrong. The CAS settings was scrutinized, and I created several new test projects to try to get my debugging back on track.

Realizing that there is very little content on VSTO out there and that VSTO is simply a thin wrapper for old-school Outlook development I turned to the vast knowledge of COM addin developers. My hero of the day is Josh Einstein who explains how Outlook quarantines COM Add-Ins if they don't behave. For VSTO apps all managed plugins are loaded through the VSTO loader, so if something goes horribly wrong with one of your VSTO apps, none will run. What you need to do is to go in Help -> About in Outlook and open Disabled Items. Here you'll probably find the VSTOLoader.dll  (or was it VSTAddin.dll). Remove it from disabled items and you're good to go.

 

Filed under:
Adding a listitem using Lists.asmx for Windows Sharepoint Services
13 June 05 10:57 AM | madsn | 1 comment(s)

Sometimes you'd just whish for all data in the world to automatically describe itself properly. I just spent the weekend contemplating whether I'm a complete retard or not, after not beeing able to add a listitem through the WSS Web Services. I was using the UpdateListItems method and trying out every possible combination of attributes for the Batch and Method elements.

Finally Google came to the rescue with a newsgroup posting solving my problem. So I you're recieveing this error when calling UpdateListItems:

<ErrorCode>0x80004005</ErrorCode>

<ErrorText>Cannot complete this action.Please try again.</ErrorText>

And you've tried everything else.. chances are that you're trying to update or create a URL field and the Hyperlink type in Sharepoint must be on the format

[ValidUrl][Comma][WhiteSpace][Desctiptiontext]

For example: http://localhost, My local webserver

 

Filed under:
VSTO for Outlook
08 June 05 10:59 AM | madsn | 2 comment(s)

The much awaited support for Outlook is now official and can be downloaded for Beta 2 from Microsoft.

I've been experimenting a little bit with the pre-beta bits, but my colleague Kjell-Sverre Jerijærvi has come a lot further. Get the low-down on some beta whoes on deployment of VSTO for Outlook in his write-up here.

When you've read Kjell-Sverres blogpost and been to MSDN to check out this article make sure to grab a hold of the codesnippets on the bottom of the page. There are also samples for download. Additionally there is a document included in the Beta install for Outlook which is a must-read before you get started. The document should be found on your local computer here:

\Program Files\Microsoft Visual Studio 8\Visual Studio Tools for Office\Documentation for VSTO Outlook Add-in (Beta).doc

For the next couple of days: VSTO for Outlook to stuff mail into Sharepoint. Killer app? I hope so:-) Feel free to contact me if this is something you've thought about and you've got some insights, suggestions or input.

Filed under:
More Posts

This Blog

<a name="MyWork">!My work!</a>

Funstuff

Goodies

MSCRM Blogs

Sharepoint

Useful reading

Weblogs

Syndication