InputFormControls width problem

While I appreciate how much value you can get out of repurposing the SharePoint control templates, I do repeatedly get annoyed at using them. Not only they produce an infinite number of tables on your page, they also often hardwire properties for no obvious reason.
 
This time I came across this problem: we had to put a SPGridView into an InputFormControls and it just did not want to use the full width of the section, as you can see here:
 
InputFormControls Width Problem 
 
I'll cut it short... it was the ms-inputformcontrols class that hardwired it to 375px. Overwrite it to 100% and you should be fine.

Published: Jan-20-10 | 0 Comments | Link to this post

Next Product up: FC.ImageSearchResults

Right on the heels of our FC.MetadataExtractor 2.0 release shortly before Christmas we're working hard on getting a fun product out the door: FC.ImageSearchResults. It'll probably be another couple of weeks before we hit beta 1, but I thought I should already mention it here.
 
All the metadata that can be unleashed by the FC.MetadataExtractor product will be available to search on if the FC.ImageSearchResults solution is installed. And what's best, the solution comes with a custom searchresult page that displays those images nicely with thumbnails and metadata that makes sense for images. I'll blog more about this as we get closer to the public beta release.
 
As always with our product efforts we're aiming to support both MOSS (the commercial product) as well as WSS 3. This time I am especially happy to tell that there will also be support for a free version of SharePoint: while search in WSS 3 simply sucks, the Search Server Express 2008 (SSX) product (that simply can be installed "over" an existing WSS 3 installation) has all the bells and whistles to serve as the basis for our search solution.
 
If you run WSS 3 and haven't looked at SSX yet ...I highly recommend you do so ASAP!
 
The object model of the libraries that get installed with the SSX "upgrade" for WSS 3 have everything we need for our solution. Even the Search user interface that is added to the Central Administration is quite nice. However, there was one thing that was missing: a link to the page to manage the so-called "Shared Scopes". Our solution installs a Share Scope called "All Images" that allows to search across the entire farm and while we do that programmatically we of course prefer it to be visible to the administrator, so what is installed is transparent.
 
Well, the respective admin page for managing the scopes is actually installed. Just the link is missing. So you can get to that page simply using this link:
 
http://<server name>:<central admin port>/ssp/admin/_layouts/viewscopesssp.aspx?mode=ssp
 
View Scopes

Published: Jan-16-10 | 0 Comments | Link to this post

SharePoint DAM: Versioning Metadata

As we've just released the 2.0 version of our FC.MetadataExtractor product I thought I should catch up with some blog postings on DAM functionality in SharePoint.
 
One of the great things that come with SharePoint 2007 and WSS 3 is that you can keep track not only of the different versions of an image but also of its metadata. This is extremely helpful as entering metadata in a corporate environment is usually done over multiple rounds and maybe even involves several contributors.
 
All you need to do to activate versioning of metadata is to enable Versioning in the Site Settings:
 
Versioning Metadata
 
Once that is enabled you can either create a new version by uploading a new version of the image which includes new metadata, or by editing the metadata directly in SharePoint.
 
The Version history is now available via the item's context menu and the metadata trail can be seen in the screenshot below:
 
Versioned Metadata
 
This is just one example of the great base-level functionality SharePoint 2007 / WSS 3 include that can be applied in many scenarios, but is especially useful for metadata-heavy applications like DAM.

Published: Dec-23-09 | 0 Comments | Link to this post

FC.MetadataExtractor 2.0 Launch

It's been quite a busy time lately, as we were zeroing in on the 2.0 release of our FC.MetadataExtractor solution, and I have to say that the good old 80/20 rule certainly still applies (the last 20% of the work takes 80% of the time).
 
Just to give a quick overview: The FC. MetadataExtractor reads metadata from images - either on upload, or triggered manually - and stores it in the Sharepoint columns.
 
As the SharePoint custom document parser interface turned out to not be available for the main image formats we had to use Event Receivers. However, those also turned out to be quite inadequate, e.g. as the ItemUpdated receiver is asynchronous and interferes with the EditForm that comes up when someone uploads a single image. Hristo Pavlov had a good suggestion on how to solve that one problem, but it still leaves a lot of questions on how to wrap all this customization into a single feature, which is to be installed.
 
And beyond that there were many more individual problems attached to the different ways to upload or move images to a SharePoint library. Some of them are related to IIS and SharePoint settings in general, like for uploading large image files. I'll do a separate post on this once we're through with the release.
 
At this point I also want to thank our beta testers. They are still the best source of inspiration and guidance!!

Published: Dec-11-09 | 0 Comments | Link to this post

New SharePoint 2010 beta install

Last night, I read that the beta version of SharePoint 2010 was available on msdn.com and couldn't resist getting an immediate feel for where exactly Microsoft stands with this new release. So I downloaded the SharePoint Foundation 2010 (correlates to the "Windows SharePoint Services", the "free" basic version of SharePoint) and started the install.
 
SharePoint now has a Welcome dialog that looks familiar to many of the other server products released in the last year or so, including valuable links and - most important! - a link to install the "prerequisites". Usually running this tool means that the install doesn't crash out halfway through when it recognizes that a vital component is missing.
 
Preparation Tool
 
The installation of the prerequisites took about 15 minutes on my machine (that was up-to-date on service packs etc.) which is not too bad. However I got a strange feeling from the fact that configuring the IIS role took about 10 minutes of those 15. Well, it all seemed to have worked in the end.
 
Onto installing SharePoint - only to be greeted by another alert:
 
KB971831
 
Great, the software is telling me that I made a mistake and that I should have read the note about the installation prerequisites... well, you are welcome to check the first screenshot above for yourself for a mention of that KB97183! BTW, you can grab that Hotfix here.
 
I'd call that a "departments out of sync error", as this is about a release that was just dropped, which practically means that one team involved with documentation and another team involved in coding the prerequisite checks don't properly communicate. That, however reminds me too much about one of the fatal flaws in SharePoint 2007: obviously the developers never really got their communication right with the technical documentation folks. I was promised in Vegas at the recent SharePoint conference that this time around the documentation would be much better and "complete". Let's see, shall we?
 
License Terms
 
Once past the common License Terms confirmation, the familar SharePoint setup dialogs appeared... slightly different background, but very much the same as in 2007.
 
Install Options
 
This time I opted for something I usually NEVER do: I chose the "Standalone" option, which doesn't allow you to easily add servers to the farm. My reasoning was that, if anything would, this option should work. (I'll try the "real" farm installation right after this)
 
The install went fine all through-out. However, when I came to the end, the "Applying Updates" status stayed on forever ...as it was late I just went to bed and left it running, so I have no idea what major part was downloaded and replaced at that point.
 
Applying Updates
 
This morning, the install had completed properly and I was able to start the usual Wizard.
 
And finally, after the wizard had finished, I got to see the Home page of SharePoint 2010! :-)
 
SharePoint Foundation 2010
 
Here, of course, I couldn't resist immediately checking the compatibility of one of our SharePoint 2007 products. So I installed the latest beta of our up-coming Metadata Extractor program and voila, the install and deployment worked all fine.
 
Metadata Extractor 2010
 
The only issues I could see are with some user interface elements that our solution adds which are not displayed in SharePoint 2010. So my initial feel is that there is a good amount of backwards compatibility, but definitely some additional work required to port SharePoint 2007 solutions to SharePoint 2010.
 
 

Published: Nov-18-09 | 0 Comments | Link to this post

ChangedProperties Property - Documentation Error

We're getting ready to ship the 2.0 version of our "Metadata Extractor" product that extracts metadata out of images and copies it into the list columns. One of the cool new features is that it also extracts the metadata when a new version of a file is uploaded (previously it only did that on the initial upload, which was hard enough, given the problems around the asynchronous ItemAdded eventhandler ...but that's another story ;-).
 
The best way to check what exactly has been changed on an item is to use the ItemUpdating and ItemUpdated events. However when we looked into storing information that was available in the ItemUpdating event that occurs first, so that we could access it in the ItemUpdated afterwards we were a bit confused about the documentation, especially the meaning and usage of the ChangedProperties property. MSDN states that it "gets properties that have changed". Well, not only is that as minimalistic as can be, but also simply wrong:
 
The ChangedProperties property can actually be used to store values from the ItemUpdating event to access them in the following ItemUpdated eventhandler.
 
Example:
If you add the following statement in your ItemUpdating eventhandler:
properties.AfterProperties.ChangedProperties.Add("FILEVERSION", item.File.Versions.Count.ToString());
...then you can access this value in the ItemUpdated eventhandler via:
string previousVersionNumber = properties.AfterProperties["FILEVERSION"].ToString();
Btw, if you step through your code you'll see that the key/value pair is actually being added to the ChangedProperties property. SharePoint then copies it over to the AfterProperties collection before the ItemUpdated eventhandler is invoked.
 

Published: Nov-15-09 | 0 Comments | Link to this post

VSeWSS 1.3 release delayed until "mid December"

If you´ve wondered what happened to the VSeWss 1.3 release that was promised for last July, here´s the news: I just got to talk to Paul Andrew here at the SharePoint conference in Las Vegas and he told me that "due to a resource conflict" the release has been pushed back to "mid December".
 
With the beta release of SharePoint 2010 announced for "November" one can safely assume that VSeWSS 1.3 will come out a month after SP 2010 beta has been released, as the same resources have to finish the SP 2010 beta first.
 
Better bad news than no news is the only positive pitch I can come up with for this ;-)

Published: Oct-19-09 | 0 Comments | Link to this post

Custom List Forms with Code-behind

There are a lot of articles on the web about manually modifying the list forms and the ListFormWebPart in particular, but there isn't that much information about modifying these forms programmatically, and the problems that come with that.
 
To start with, there's a great article on SharePoint List Forms by Hristo Pavlov that I highly recommend.
 
Customizing the ListFormWebPart is a chapter by itself, but what we needed was to customize the EditForm.aspx. Actually, we needed to inject a control that would prevent the form to come up while the asynchronous "ItemAdded" event, triggered by a file upload to the library, was still busy retrieving metadata (also an adventure in itself, as I consider that clearly a conceptual bug in SharePoint), which would result in an exception and a failure of the upload and/or the metadata extraction.
 
Now, there are actually two levels of forms one could utilize: each list/library has a set of these forms (New, Display, Edit) and the content types that are associated with the list/library also have these forms.
 
We chose to replace the EditForm.aspx of the document-type content types with a custom aspx form with code-behind. Why code-behind? Well, there are actually a couple of things one needs to adjust on the fly to make this work. One example would be that a custom application page should reside in the "_layouts/" space and the default.master masterpage that is used by the list forms is not directly accessible from there. But the most important reason was that the ListFormWebPart requires the "ListName" (it's actually the Guid ID of the list) and the "ListItemId" (which is what it sounds like :-) to be set properly when the OnInit event fires.
 
ListName&ListItemId
 
So, where's the problem? The ListFormWebPart is an incredibly flexible piece of programming art that can render itself on the fly automatically, depending on what list, content type and columns are to be displayed, BUT it does not retrieve the ListName and ListItemId from the Page.REQUEST automatically. Alright, we can do that with the code-behind, but that's NOT the problem ;-) The problem is that the control isn't available during the OnPreInit event to set these properties, and before the OnInit event handler gets fired SharePoint already throws an exception stating that no item could be found for the list and itemId specified ...Duhh!
 
Well, the solution is actually (as most things in life) trivial: the OnInit event fires on the controls before it fires for the page. Therefore it is important to add a code-behind event handler not only at the page level but also for the Web Part itself:
 
WebPart OnInit event handler registration
 
And the rather simple code-behind for this looks like this:
 
        protected void Lfwp_OnInit(object sender, EventArgs e)
        {
            string listId = Page.Request.QueryString["List"];
            string itemId = Page.Request.QueryString["ID"];

            ListFormWebPart lfwp = (ListFormWebPart)sender;
            lfwp.ListName = listId;
            lfwp.ListItemId = Convert.ToInt32(itemId);
        }

 
The beauty of this solution is that the same custom EditForm.aspx can then be used not only for all Picture Libraries, but also for Document Libraries.

Published: Oct-12-09 | 8 Comments | Link to this post

Windows Server 2008 R2 offers very significant improvements

I don't understand why Microsoft virtually diminishes the value of the R2 release. I bet that many people out there perceive R2 to something like a Service Pack, which is mostly about bug fixes. However, Server 2008 R2 has quite an improved performance and feel to it!
 
 
Support of clustering and "live migration" of virtual machines are very important functionality. But even something "small" like the hot add/remove of SCSI disks is a great value to administrators.
 
I sure don't like everything that comes out of Redmond, but Hyper-V had a quality level way above MS average from the start, and the team is continously getting it better and more complete. Good job guys!

Published: Sep-03-09 | 0 Comments | Link to this post

OnTaskCreated activity is trouble.

I meant to write this for quite a while and kept forgetting about it...
 
We've had numerous situations while developing Windows Workflow Foundation workflows in which either the OnTaskCreated or the OnTaskChanged activity would not be called ("fire"). The behaviour was non-deterministic, whereas sometimes it would work and then it wouldn't. E.g. I'd add an arbitrary line of code and then it would work.
 
Well, long story short, after following all the paths that could normally go wrong, like checking whether the taskID and the taskProperties are properly set, and also to check that all objects could serialize ok, and installing all relevant Hotfixes and Updates etc., I resorted to a recommendation to simply leave out the OnTaskCreated activity and have not had any problems ever since.

Published: Aug-27-09 | 2 Comments | Link to this post
 Next >>