Archives / 2005
  • Using VS2005 with SharePoint

    Hopefully everyone is happy and back at work and now eating leftover turkey and stuffing for the next few weeks. I know I am. The entire crew was over for the holidays yet the fridge is still full of goodies. Hmm, wonder if that veggie tray can keep for a year in the fridge?

    Anyways, with the release of VS2005 and the recent service packs for SharePoint there is still lots of confusion over building applications and web parts with VS2005 and what works and what doesn't. As there is confusion, it must mean the information out there isn't clear enough for people to understand. In my infinite wisdom I figure why not add another log on the fire so hopefully this post will either make things as clear as mud, or really leave you scratching your head.

    Getting Started
    First off, you must have the .NET framework (version 2.xx) installed on your server (and your dev envrionment if you have one) for all this to work. Before you go off and do that (if it hasn't already been done yet) make sure you have the absolute latest service packs for both Windows SharePoint Services and SharePoint Portal Server. Okay? Great. Now you're ready to rock.

    Building .NET Applications
    Obviously, with ASP.NET 2.0 installed and running on the server you can build a regular web app using 2.0 no problem. You can use any part of the new 2.0 framework like new controls, the membership provider, the sitemap, etc. but you cannot use System.UI.WebControls.WebParts (see below). Things to check on your setup:

    • Make sure you exclude the path to the application (the name of the virtual server) in your SharePoint configuration, otherwise it'll think it's part of the SharePoint system and try to do evil things to your app.
    • Make sure IIS is using 2.0 of the framework for your app. You can check this in the IIS manager. Right click and they'll be a new tab for setting the ASP.NET version on that virtual directory.

    Building Web Parts
    Here's where things get tricky. First off, forget about using the System.UI.WebControls.WebParts namespace or inheriting from that WebPart class. Those type of WebParts (very much the same as SharePoints) have their own manager and tie into various parts of the framework and the support just isn't there yet (as far as SharePoint goes). When V3 rolls around you'll be able to build WebParts using this framework and the ASP.NET 2.0 WebPart will be almost identical to the SharePoint WebPart class.

    Next is building SharePoint Web Parts (referencing the 1.1 assembly) with VS2005. It can be done but takes a little work. As there is no 2.0 template yet, you'll either need to have VS2003 hanging around to build you a skeleton Web Part or keep a blank one handy. In order for the web part to work with WSS you'll need to go into the site in IIS and ensure that the website is using ASP.NET 2.0. You will also need to use the stsadm forceupdate option to force SharePoint to perform the update (after you flip the website over to use 2.0), the command is:

    cd /d %commonprogramfiles%\Microsoft Shared\Web Server Extensions\60\Bin
    stsadm -o upgrade -forceupgrade

    You should do an IISRESET just to make sure everything is applied. Now development of Web Parts is the same as ASP.NET 1.1 except you can use .NET 2.0 features (like Generics, Anonymous Delegates, ObjectDataSource, etc.). The most important thing to note here is that you can ONLY do this with Windows SharePoint Services. SharePoint Portal Server has to run on ASP.NET 1.1. as 2.0 isn't supported. SQL 2005 and other "2.0-ish" features are supported, but the runtime isn't which means you can't compile a WebPart and have it work in Portal Server. A good reference as to what works and what doesn't based on service pack installed can be found here. Bottom line is that if you want to build ASP.NET 2.0 Web Parts using VS2005, you can only do it on a Windows SharePoint Services (WSS) site install (not SPS with WSS).

    Now if you want to build a 1.1 WebPart on SharePoint Portal Server that talks to an ASP.NET 2.0 application, that can be done because in IIS you can set the web site to use ASP.NET 2.0 and have the Portal Server WebPart communicate (through web services, remoting, etc.) to the 2.0 web part. It takes a little work, but if you keep your Web Parts to only presentation (which is what they're supposed to do) then there's nothing to say you can't have a 2.0 Business Layer talking to a 1.1 Web Part on Portal Server (using all the features of SPS like single sign-on, enterprise search, etc.). SharePoint Portal Server doesn't care that .NET 2.0 is installed on it, it just can't be targetted to use it.

    As an alternative option, you can use the Son of SmartPart (I think Jans hates that name). This little doofer uses the 2.0 framework and will just suck up little ASP.NET user controls and render them out via a Web Part in SharePoint. So yes, you can build something that looks and smells like a Web Part using .NET 2.0 and running on SharePoint right now but:

    • You must have the .NET framework 2.0 deployed to your server
    • You must be running the latest Service Packs for all products installed (SPS if present and WSS)
    • You can only deploy 2.0 assemblies to a WSS only setup, not WSS running under SPS (since you can't split the IIS virtual server into two and it has to be targetted to 2.0)

    That's a lot of musts but it can be done. I'm sure there might be other ways you can do it (and I hope I didn't miss anything), but for other ways you'll probably have to do some magic incantations and sacrifice a small marsupial to get it working.

    Hope that helps.

  • Merry Christmas All!

    No fancy "Twas the night before SharePoint" post. Just well wishes for you and yours during this festivus. Enjoy and be safe!

  • Tired of the boring old Quick Launch?

    Then try Bob Mixon's replacement Quick Launch! This is tres cool so thumbs up from me (and I didn't even know he was working on this). Not only does it look exactly like the default Quick Launch (meaning you could go and replace it on everyone's site without them knowing, sneaky huh?) but check out some other cool features he's added:

    • The ability to turn any set of lists on or off. So if you chose to not display Surveys, simply turn it off.
    • The ability to display separation lines below the grouping headers.
    • The ability to display an Actions section with access to manage site settings, users, content, and alerts.
    • The ability to display icons next to items
    • And, the best of all features, the ability to dynamically add any items to the quick launch bar (with your own groupings) through a standard SharePoint list.

    You totally have to check it out here. Go. Go now. What are you waiting for?

  • Hey Developers, Plugins for SharePoint Wanted!

    If there's one thing I really love, it's SharePoint (well, sometimes). And Plugins. Those cute little furry dll files that you drop into a directory and make programs do cool things. So why not combine the two?

    I'm putting together a SharePoint Admin Host tool that's driven entirely by plugins. How so you ask? Well, it's pretty simple. Using my SPS Wrapper classes and connecting to a SharePoint server via web services I have a host that will let you do pretty much whatever you want against the SharePoint information. A Plugin manager inside the host will look for dlls and load them at runtime. They also expose the wrapper classes to your plugin, so you can do things against SharePoint without doing any heavy lifting.

    The Host does two things for the plugins. First it connects, via web services, to the server and builds a tree of all areas, sites, lists, etc. (dynamically as you expand nodes on a treeview of your portal/wss site). Second, it communicates the selected node(s) to your plugin as a fully typed class that you can interact with. All without SharePoint on your client desktop.

    What can you do with this? You can build plugins for it silly. So lets say the user fires it up and connects to his portal then selects a few areas. You can write a plugin that creates a subarea (based on available templates from the portal) under each of the areas selected. Or the user selects all the sites in the tree. You can write a plugin that applies a theme against all of them in one fell swoop. Want to create client side reports from SharePoint data? No problem. It's all there, waiting to be unlocked. You just have to write the guts.

    So what do I need? I need developers to write plugins. Email me and I'll hook you up with a development kit. It includes one PluginInterface.dll that you'll reference in your assembly and derive your plugin classes from the public interface available. An API document on writing plugins with all the methods you need (there are only a few) and classes that you can use to access SharePoint information from. Sample plugins with source (C#). A lifetime subscription to Rice-a-Roni, the San Francisco treat, and the hosting program that will run all this junk (plus my undying support and other good stuff).

    Just send me off an email with your info, what plugins you're thinking about writing, your social security number, the number of Senators in Congress today, and anything else you can think of. I'll get you started and we'll look at forming a small community for this where people can download new plugins as they become availalble (much like the add-on community that exists for something like say FireFox).

  • Important SharePoint fix Available Now! Get them while they're hot!

    Well, important if you're Japanese and have a problem with the translated text for the Later than filter criteria field and for the Earlier than filter criteria field being switched. Here's your hotfix.

    Don't know how many Japanese readers I have (I wasn't able to get into the Google Analytics beta fast enough) and how many of those run SharePoint Portal Server but for those that are there and care, this ones for you!

    Isn't technology wonderful?

  • Use the Force Luke!

    A bit of a sidetrack as I was planning to blog with pics on the mod for putting your image above the menu bar (I still don't agree with Heather that her solution works, nyah) so I will get to that, but later.

    I did want to mention a couple of things about posting questions about SharePoint (in newsgroups, forums, wherever). First, please read your posts before you click the big send button. I don't know how many times we sit there trying to decipher a request when there's a typo in it. Really. It's quite simple. Proof read your post (being a blog, question on a forum, or an email) and make sure it sounds like it makes sense. Okay, maybe I'm guilty of this on my blog but like I said, there have been more times than I can remember where I've been reading the newsgroups and questions are being thrown about that make absolutely no sense. Relax, take your time, and read your own scribblings before you inject them onto the world. Gonzo journalism is great, but you need to master it before you can fire off posts without editing. Seriously. It will expedite the process of getting an answer if the guy on the other end of the line knows what you're asking.

    Next is the big one. Recently there's been a pretty meaty selection of posts and emails with people asking if SharePoint can do this or SharePoint can do that. Some don't even ask if the tool can do it but rather go to the big, dark place of "I have to implement x using SharePoint or I'll get <fired | castrated | exiled | etc.>". Guys (and girls), hate to break it to you but SharePoint is not a shape-shifting, set your phasers on stun, beast from 20,000 fathoms tool that is all things to all people all of the time.

    Yeah, drink that in for a minute.

    It has custom lists, document libraries, it's web based, can version documents, has security, audiences, single-sign on, blah, blah, blah, blah, blah, blah. However it does not: make you dinner; vacuum your living room; teach your 7 year old tennis; play ball with your dog; impregnate your cat; dust your buffet and hutch; talk to your Xbox 360 (well, maybe); or generally do stuff it wasn't designed for. Yeah, it's a great tool and one that is very powerful but you, as an implementer of SharePoint need to know the design boundaries of it and stop ripping it apart to do your bidding. You wouldn't use your light sabre for grating cheese would you? So stop making your SharePoint deployment do crazy things. Yes, it can do it but should it? Probably not.

    Give you a few examples. We all know that lookup lists are kind of clunky. The can only use lookup values from the current site, can't use calculated fields to lookup from, and they can't filter values in the lookup. These are design limitations. Live with it. Can you achieve these things? Sure. Write a wrapper to simulate the ListFormWebPart (i.e. rewrite it) and you make it do whatever you want. Write some funky JavaScript (like SharePoint doesn't have enough of this already) to filter your lists, call a web service, and otherwise rewrite the page on the fly. Create your own ISAPI filter to do what SharePoint doesn't do.

    C'mon people. Give your head a shake. If the answer to your problem isn't already in front of you then maybe it's not something that you should try to do. There's being creative, then there's just bastardizing the tool to make it do something. That's not creative, it's just plain dumb. Does Microsoft Word do a great job of editing information that might be better suited for a spreadsheet? Then use Excel. Use the right tool for the right job.

    Custom Web Parts can give you ultimate flexibility, but like anything they're expensive to develop. Yeah, even that 10 line Web Part to hide something on the page is 10 lines you have to feed, maintain, and grow. Update when the next version comes along. Add to version control. Document so when you get hit by a bus the next guy knows what it's used for. And so on. Development is fun but expensive so ask yourself if you can't solve a problem with an OOTB solution maybe adjust your problem (or it's parameters) so that it fits the technology you have to work from.

    Web Parts will give you what you need, but at a price and too much of a good thing might be too much on a Web Part Page. 20 Web Parts on a single page, while they're all doing "important stuff" might take 30 seconds or so to render per person (as it's fetching data from all over the planet). Having this as your home page in your organization might just bring down your SharePoint server. Is this a design flaw or a launch problem? It's responsible development that you need to look at holistically and not just from the "I need x to solve my problem" type of approach.

    In any case, you can achieve great things with a great tool but like any tool, you need to use it responsibly and with malice aforethought about what you're doing. Before you go off to build the uber-web part that will deliver everything under the sun, ask yourself if you really need it or can you leverage what you already have.

    Software development is full of compromises and sometimes you just have to say no. No to the communications person screaming that they want their image on the right instead of the left. No to the HR person yelling that they want the form to dynamically change based on the users gender and way that they're sitting in the chair. No to the finance guy that wants to use SharePoint as his SAP replacement and do the entire corporations payroll with custom lists and 8,000 lines of JavaScript for the business calculations.

    Trust me, you'll be better off in the long run.

  • Hurray for Stubbs!

    Thank the maker that Stubbs the Zombie, the only game in which you become the Zombie and get to do uber-cool things like eat brains and possess people (something I sometimes need to do at work) is now officially supported on the Xbox 360 (previously it wasn't listed on the backward compatible list). Very cool.

    Of course now there's the issue of me finding a 360 in Calgary, which is pretty much impossible. The Best Buy/Future Shop guys say "well, show up in the morning and maybe we'll have one". Uhh, no. Why can't I just walk in and get one? I mean, it's not like there's no demand (yeah, yeah, grumble, grumble, supply, supply). Bah, humbug!

  • Adventures in CSS: Putting a banner image above the menubar in WSS

    I recently did a theme on a site and the desire was to have the WSS sites look similar to the Portal areas. I don't know how many times I've seen this kind of request and it usually leads to all kinds of having to edit tons of pages directly, doing funky things with default.aspx, etc. Here's the styles you need to override in your theme to get a banner above the WSS menubar. The trick is all done through CSS by positioning the image and using offsets, so this shows up on all pages (including the admin pages).

    .ms-banner a {
     height: 100%;
     padding-top: 54px;

    .ms-bannerframe img {
     display: none;

    .ms-bannerframe td {
     padding-left: 8px;

    .ms-bannerframe, .ms-grheaderbackground, .ms-stormefree {
     background-image: url(sitelogo.jpg);
     background-repeat: no-repeat;
     border-bottom: 0px solid;
     height: 72px;

    A bit of explaination of the tags here. Heather Solomon had an excellent posting here about doing this by just overriding the .ms-bannerframe, etc. styles. The problem however is that if you want the effect of the menubar below the image, this doesn't work. There's a hard coded valign=middle in the default.aspx page that will always override any CSS style you apply to it.

    .ms-banner a
    Unlike the portal menus (where there's a style for every frickin' menu item, selected and unselected) the WSS menu is wrapped up in a single <A> tag. We override this to a) set it to 100% and b) push the text down towards the bottom of the <TD> that surrounds it. Why set it to 100% height? If we don't, the padding value doesn't work.

    .ms-bannerframe img
    This is overidden to hide the logo.gif image. As we now have a <TD> that is much larger than it was, the image gets stretched and looks silly so overriding this tag hides it.

    .ms-bannerframe td
    With the image hidden, it still has a <TD> that it lives inside so we need to push the <TD> over so the menu text has a bit of an indent.

    A couple of things to note. Change the sitelogo.jpg to whatever you want here. This should be an image that stretches across the page, but can be partial. Just use the background-color (not specified here) to be the background and blend your image into it. You'll have to change the height and offset values here to match your image. Also this CSS will hide the default logo.gif image that appears to the left of the menu. Why? Because this trick requires you to pad the <A> tags so it pushes them down onto the menu bar (which really is the background color) so the logo.gif image gets stretched as well. There may be a way to do this using margin-top or something which will push the text down without making the <TD> tag the full height, but I haven't tried that yet.

    Also a friend turned me onto a fantastic CSS resource here. It's a cheatsheet for CSS, but is very handy so if you're mucking about with Themes and Styles, check it out. Cheers!

    UPDATE: I've updated this blog to be a bit more clear on why the tags are doing what they do. I'll follow up tommorow with some screenshots as a picture is worth a few hundred lines in a blog somewhere.

  • SharePoint Builder and ClickOnce

    I've been pretty swamped trying to get Life 1.0 going and lots of little pet projects finished up. One of which is my SharePoint Builder tool, a visual xml builder editor that will let you modify ONET.XML and SCHEMA.XML files using properties and such (rather than text editing). It's been a long time trying to get it going but it looks like the next week or so will see the release to the testers (please no more requests for testing as I have a ton of people already).

    A couple of things about the project. I'm going to be deploying it via ClickOnce and it will be using the .NET 2.0 Framework. So far the tests are good. You just go to a website and click Install and down it comes. I've even tested it with a box that didn't have .NET 2.0 on it. Since I flagged the app to have this as a pre-requisite it just downloaded and installed it for me, then continued installing SharePoint Builder. The app will check online for new versions (if you're connected) and let you know of the an update. You'll have the choice to download it or not but it means I'll have 0-issues with keeping the program up to date. I think this is proabably the bigged and coolest feature I've found in .NET 2.0. I mean, I just publish it from the IDE and next time you launch the program you'll get any changes. No more having to send out emails to people. Of course we'll still be doing things like posting change logs and notes to let everyone know, but it's a very slick feature to have. Hopefully the testers will be kind to me as this will be my first ClickOnce deployed app. Lets see if everything goes well.

    I'll be posting new screenshots and feature information on the tool over the next week as things wind down with Christmas and all. Should be a fun week. Hope you're curled up in front of a fire somewhere warm (or some such silly thing that people do on Christmas).

  • Site Settings, Apply Theme, Apply, Lather, Rinse, Repeat

    Applying themes to WSS sites is sometimes like giving birth to a duck-billed platypus on a snowy day in the middle of springtime (can't wait to see the Google search referrals from that statement). I've blogged a little about this before so ignore my rant if you've heard this song already. If all you want to do is select Site Settings | Apply Theme then you're golden. If, however, you're a developer and you're trying to test your custom theme out you need to be aware of a few things.

    First, just copying a new THEMES.CSS file into your theme directory in the 60 hive and hitting F5 in your browser isn't going to do Jack. The theme is cached and worse yet, it's part of the site and lives in a virtual directory. In other words, there's no physical place it resides so when you get it served up to you in your browser, you're getting a cached version that's actually coming out of the ASAPI filter that SharePoint is controlling and serving the page through. Open a site in FrontPage and you'll see a themes directory in the navigation tree but this physically doesn't exist. Look at the source code for a page and you'll see something like this:

    <link rel="stylesheet" type="text/css" id="onetidThemeCSS" href="/sites/sitename/themes/mytheme/mytheme1011-109.css">

    (note the name of the them varies based on language, etc.). There is no themes/mytheme directory physical directory yet you can enter that url and up pops the mytheme1011-109.css file. Again, all the magic of the ISAPI filter at work.

    Second, as a developer, it's a PITA to go to Site Settings, Apply Theme to Site, Apply, lather, rinse, repeat. Not only that, you can't simply re-apply the same theme to your site. You have to apply a different theme to the site, THEN apply your custom theme to see the results. This is 600 or so clicks for any change you make to your theme. Needless to say, theme development is like any SharePoint development. Painful and slow.

    Okay, a couple of tricks to do to make this less cumbersome and hopefully will make your theme development a little easier on your grey matter. First, get your CSS editor installed on the server. I personally use TopStyle as I can visualize things in the editor, it reformats my output in a nice way (after you've been screwing around with all kinds of styles your CSS file gets a little messy) and it's a pretty slick product overall. Second, it's handy to create a web part to (somewhat) automate the process. Clicking through and going onto the Site Settings page over and over again can drive you to going postal.

    Let's create a super-simple web part with the Web Part Template starter in Visual Studio. Add a control (a button or hyperlink will do) to the web part and create a Click event for it. In the click event what you want to do is:

    • Get the SPWeb object for the site
    • Apply the default theme to the site
    • Apply your own theme
    • Redirect to the current page

    So how do we do this? Simple:

    protected override void CreateChildControls()
       btnApplyTheme =
    new Button();
       btnApplyTheme.Text = "Apply Theme";
       btnApplyTheme.Click +=
    new EventHandler(btnApplyTheme

    private void btnApplyTheme_Click(object sender, EventArgs e)
       SPWeb web = SPControl.GetContextWeb(

    The secret here is to call the ApplyTheme method twice. First with a parameter of "none" which will set it to the default, then with the string for your theme (whatever the name of the folder is in your THEMES directory). This will flush the page enough to reapply it, otherwise just calling it with your own theme won't work.

    Okay, install this web part onto your site (the default page will do fine) and open it in the browser. Open up the THEMES.CSS file in your favorite CSS editor and start editing. Save then click your button on your Web Part. Voila. The theme is applied with one click (almost).

    There's one problem with this. While it does work, you still need to hit F5 to refresh the page fully and see your changes. Why? Because information is still cached and you need to flush it. I have tried everything to try to do this in code but can't. Mainly because its a client side thing, but also you can't process the ASP.NET control's event AND call say an "onclick" JavaScript (like location.reload(true)) at the same time. At least I can't find a way to do this and I've tried things like setting the HttpResponse to expire, flushing the Cache with SetNoStore(), etc. Nothing seems to work but at least this is a two-click solution rather than 6.

    If anyone has a solution to the refresh problem, please feel free to email me or (preferably) post it in the comments. Also if you do theme development (Shane?) maybe you have some tips to share on how you do it. Hopefully this helps you with your theme creation.

  • Keeping your head above you while everyone else is losing theirs...

    A lot of times I see emails and posts that start like this:

    "I have to redesign our entire intranet using SharePoint..."

    or better yet:

    "We just bought a copy of SharePoint and now I'm being told I have to become the expert"

    And the best part (that your manager or the powers that be say to you right after they say the above):

    "Now that you're the new SharePoint expert what will our enteprise portal that you're delivering next week look like?"

    Guys, this is like someone coming to you and handing your a <insert foreign language here that you don't recognize> manual for programming a <insert device you've never even heard of or knew existed before>. Trust me. You will live in a world of pain and hurt and anguish and die a thousand deaths if you're tossed into this situation. Be afraid. Be very afraid.

    Okay, now that the melodrama is over, if you really do find yourself in this position here's a few things to keep in mind which might let you keep your sanity:

    • Rome wasn't burned in day. Even if you're the most incredible web designer or sysadmin or network guy, don't promise that you'll bone up on this stuff overnight and build Tweedledum his vast empire. SharePoint is a hydra with heads growing out of places you wouldn't believe. Every time you cut one off (or even consider doing it) 3 more grow in it's place. You CAN master it, but this is not a "Teach yourself SharePoint in 24 hours" type thing. It's a long term committment if you want to do it right. And you won't get it right the first time so don't kick yourself when something silly happens.
    • Read, read, read, then do some more reading. There are huge tracks of blogs out there (last count over a hundred of us) that have something useful (and not so useful) to say about SharePoint. There are some great starter books. Get out there and buy them. Again, tell your manager or the powers that be that you'll be locked away reading for awhile. That may be difficult for some to swallow, but again SharePoint is big and can be unruly if you dive in without knowing how deep the water is. Just breathe, relax, read a little, and wade in slowly.
    • Virtualization. Get yourself a copy of Virtual PC/VMWare/etc and some software. There are eval versions (120 day) of Windows 2003 Server and SharePoint so setup a machine and try them out. Install them using the Administration Guide to walk your through it. It doesn't take long (half a day for someone who's never done it) and you'll get used to how things work and fit together. Get your feet wet. In a virtual environment, it doesn't matter if you blow up the server. Just choose the previously saved undo disk and reboot. This will be a great experience without you killing your network as you try to build a giant infrastructure on your first day.
    • Don't be afraid to ask. Really. There are no stupid questions (well, okay depends on what day you ask me) but if you have a concern or something cry out. Jump onto the many resources and just scream, but be descriptive. Yelling at the top of your lungs might get you noticed, but if you can't command the English language and form coherent sentences, it'll be hard for us to know what you want. In any case, the help is out there but there are two caveats to that. First, the answer might not come quickly. While the newsgroups and that thing called the interweb is a cool place to get porn from, we're not all living and breathing there day and night (some are, but ignore them for now). So posting a message on a blog, forum, or newsgroup might not get an answer for a few days even. You need a little patience. Second, your question might not be answerable or you might not like the answer. For example if you say you just HAVE to have things setup a certain way but SharePoint doesn't work with that configuration. Well, there might be no answer except to either reconfig or not use SharePoint. So be prepared to adjust and adapt. SharePoint is certainly no silver bullet and might not do everything your want (or the way you want it). Be prepared to accept the things you cannot change (and scream about the work need to change the ones you can).

    Not sure if any of this helps, but I thought I would just spend a few minutes to spread some cheer as we slip into the horribly crowded malls and freezing weather that is Christmas. And what's SharePoint without pain. Easter maybe?

  • Renaming the "Web Part Page"

    Don't you just hate it when you create a document library to hold a bunch of custom web part pages, but then they all show "Web Part Page" in the browser title? I was messing around with lookups (to create a web part page menu system) and noticed that the only lookup field that was available was a field called "Title". Hmm, this wasn't the filename and wasn't in any view that I saw or property when you edit the page.

    Sure enough, there's a column in a document library called "Title" and when you base the template for the library on Web Part Pages, the default when creating new documents is, you guessed it, "Web Part Page".

    Patrick blogged awhile ago about changing the title here but there was always a belief that you had to edit a WPP in FrontPage (thus unghosting it) to change the real title (and thus the browser window title). Just follow these steps to do it without invoking the great white ghost (Office 2003 client is required here, see update below about the ghosting part):

    1. Create your document library and base it on the Web Part Page template (or use an existing one)
    2. Go to the "All Documents" view of the library and click on "Modify settings and columns"
    3. Select the "All Documents" view to modify it
    4. Click on the "Title" column to include it in the display
    5. Optionally change it's position from last to first (or second, or third, or...)
    6. Go back to the "All Documents" view and you'll see the new "Title" column (which should show all documents with a title of "Web Part Page")
    7. Click on "Edit in Datasheet" in the toolbar (this is what you need the Office 2003 client for, the Title property doesn't show up on the Edit form page for the library)
    8. Now change those ugly "Web Part Page" titles to something useful and meaningful to you and your loved ones 
    9. Launch one of the changed pages and bask in the glow of your accomplishments

    Simple but effective.

    Update: Thanks to comments from Daniel McPherson, I did some digging and testing. Turns out that the page does go unghosted when you edit the Title column. Check out Marice's posts here and Daniel's post here about it. Bummer. However at least this does provide an easier interface to change the title rather than cracking open the page in FrontPage to do it.

  • Deconstructing the QueryProvider

    SharePoint search capabilties are pretty powerful but when you're dealing with clients, more often than not, you need to build your own search mechanism because the client wants a custom page to look a certain way or they don't want to train users in how to use the advanced search (yeah, it happens) so I thought I would take you down the QueryProvider lane for a bit. Some of this information is documented in the SDK (and repeated here), however you need to sacrifice a small marsupial or skink to the great one if you want to actually try to pull it together to make any use of it. Hence the reason for this blog.

    We'll start with the QueryProvider, a simple class that you use to issue searching against SharePoint. The creation of it is documented in the SDK but briefly you build one like this:

    TopologyManager topology = new TopologyManager();
    PortalSite portal = topology.PortalSites[new Uri("http://servername")];
    PortalContext context = PortalApplication.GetContext(portal);
    QueryProvider queryProvider = new QueryProvider(context.SearchApplicationName);

    Note that the server name in the PortalSite creation must be the NETBIOS name of the server, not "localhost" because that won't work.

    Once you have your QueryProvider created the challenge of actually getting a query working is the main cause of anyone tearing their hair out. Why? Because a) the syntax is SQL-like, but not quite and b) trying to do a complex query will blow your head out the back of your skull. I could blog for days just on all the options in the Search query but there are 3 main groups that you need to worry about.

    This is the basic SELECT statement you would make in SQL and will return the fields you want in your output. Examples are "DAV:href" and "urn:schemas-microsoft-com:office:office#Author". URNs must be specified as delimited identifiers, enclosed in double quotation marks. You have to have at least one field so include something like "DAV:href" or something that will be there for any type of object. Otherwise, your query is going nowhere. Any other fields you add are up to you and will be returned in the DataSet once we execute the query. So at a minimum we're going to have the SELECT statement look like this:

    SELECT "DAV:href"

    It's also good to put in the "" column so you don't get an empty DataSet returned if there's no match in your query.

    Okay, now that we have the fields we want, we have to tell SharePoint where we want to select from. This is generally two things:

    • Portal Content (i.e. stuff that exists in the portal)
    • Non-Portal Content (i.e. you know what this should be)

    That scope will cover off everything that's in SharePoint and everything in your WSS sites, the Profile Database (for searching people) and other goodies (like if you have your SharePoint server crawling a file share or something). You specify it like this:

    FROM ( TABLE PortalContent..Scope() UNION ALL TABLE NonPortalContent..Scope() )

    Finally we need to specify the WHERE clause, which filters the results of what we specified in our SELECT statement (otherwise we would get the entire contents of the portal coming back).

    There are a couple of ways of specifying search criteria. First you can just specify the column name and matching value:

    WHERE ("DAV:contentclass" = 'urn:content-class:SPSPeople')

    This will give you results of all the profiles in SharePoint. Another way is to find text using the CONTAINS or FREETEXT predicates. Here's a simple example:

    WHERE Contains('computer')

    This finds anything with the exact word of "computer" in it. CONTAINS allows you to use a wildcard for multiple matches, but only for prefix matching so this will work:

    WHERE Contains('computer*')

    This won't:

    WHERE Contains('*computer')

    Here's an example that only finds matches where the FirstName property of the users profile matches "gary".

    WHERE Contains("urn:schemas-microsoft-com:sharepoint:portal:profile:FirstName", '"gary"')

    This uses the column name (the first parameter to the Contains predicate) which tells us to only compare against the FirstName column. You can use "ALL" or "*" if you want to search all columns. The CONTAINS predicate is better suited for "exact matches, in contrast to the FREETEXT predicate, which is better suited to finding documents containing combinations of the search words spread throughout the column.

    You can also combine the search values (like looking for people with Gary as their first name) with the content-class so, for example, add this to your where clause to only search People records (rather than documents or sites by Gary):

    WHERE (Contains("urn:schemas-microsoft-com:sharepoint:portal:profile:FirstName", '"gary"')
    ("DAV:contentclass" = 'urn:content-class:SPSPeople'))

    Again, basic SQL syntax so remember to get your quotes, double quotes, and brackets correct as that's a common mistake trying to debug a query. There are other SQL statements that you can use here like ORDER BY (to specify how the returned values are sorted) and RANK BY. Additionaly you can also weight words using the IsAbout type, and other neat tricks like "this" NEAR "that". Check out the SDK Topic "General Query Language Information" for all the dirt. This posting is just meant to get your started.

    There are some great tools out there to help you with building queries. One of them is the SharePoint Query Builder Tool. Invaluable as it will look at your SharePoint server, grab all the content sources and properties and build the SQL for you. You can then just use this as-is in your code or update it to accept values from say a TextBox control in a Web Part. Very handy to explore the Search features of SharePoint and see what works (and what doesn't) so I recommend you getting this. It's available free from here on GotDotNet.

    Here's a simple example that gives you the bare minimum. It searches the Profile directory for people with first name of "John" and returns the link to the users MySite page.

    ( TABLE Portal
    Content..Scope() UNION ALL TABLE NonPortalContent..Scope() )
    Contains("urn:schemas-microsoft-com:sharepoint:portal:profile:FirstName", '"John"') AND
    ("DAV:contentclass" = 'urn:content-class:SPSPeople')

    Now take this query and call QueryProvider.Execute(query) with it (where query is the query above). The result is a DataSet but since I can't show you a DataSet, here's the result in XML (from the Web Service, but same results either way):

    <ResponsePacket xmlns="urn:Microsoft.Search.Response">
    <Response domain="QDomain">
    <Copyright>Microsoft (c) Office SharePoint (tm) Portal Server 2003</Copyright> 
    <Document xmlns="urn:Microsoft.Search.Response.Document">
    <LinkUrl fileExt="aspx">http://spsdev/MySite/Public.aspx?guid=3751B6E1-34C0-4B93-963B-B827BCFDF8A1</LinkUrl> 
    <Properties xmlns="urn:Microsoft.MSSearch.Response.Document.Document">

    You can take this and use XSLT to format it. If you're using the DataSet, just bind it to a grid and you're off to the races. A more advanced blog would feature connecting this to the Search Results web part, but I'm not advanced and it's late on a Sunday evening so you should be able to take this and run with it, building your own queries and getting the results you want.

    To get to really understand what parameters you need, you'll need to check out the mapped properties in your search. Just crack open your portal and got to the Manage Properties of Crawled Content page (http://servername//_layouts/1033/Properties.aspx). This will show you the names of the properties that have been brought over from ActiveDirectory (for people) and ones that have been crawled from documents and content (like everything under urn:schemas-microsoft-com:office:office for Office documents).

    Also you might want to consider building a class or some helper methods to build your queries as you can get quite complex. Imagine if you were searching for all employees with a first name of "John" who reported to a manager named "Bob" and had a phone number starting with "416". Yeah, it can be a pretty ugly SQL statement at the end (and if you do manage to create one that complex send it to me so I have something to scare the kids next Halloween).

    Have fun!

  • Adventures with CEWP: The Real-Time Clock

    Todd Bleeker lives and dies by the Content Editor Web Part (CEWP) and so do I. This is such a great little thing to prototype ideas through, create small scripts to show what can be done and get solutions up and running quickly and easily before you break out the C# project. In fact, you can also do some amazing things with it by overriding styles and writing simple JavaScript in it.

    Recently someone asked how they would go about putting a clock on their site. You know, the real-time one you see ticking away on peoples sites. There are a gadzillion of them out there in JavaScript so why not chuck one into a CEWP to create a clock. Sure enough, CEWP is your friend and always comes through.

    You can check out (and use for your own nefarious devices) my JavaScript Clock Web Part here on my SharePoint playground site. Thanks to Maxx Blade's Clock for the JavaScript. Enjoy!

  • Plumbers @ Work, MSDN Flash, and Community Radio oh my

    I'm really happy to say that our podcast show about .NET, Plumbers @ Work, is featured in the latest MSDN Flash. If you haven't subscribed to MSDN Flash, I encourage you to do so. It puts you in touch with the .NET community, user groups, and much more (yes, another shameless plug for another mailing list to clutter your inbox).

    Another cool thing is that we have our very own tab on the Community Radio at MSDN Canada page. Very nice. Not sure if the RSS feed on that page works, but you can click on the Listen Now icon to listen to our first show. We're done taping and editing the second show and will have that online shortly so watch for that soon on our Plumbers @ Work site.

  • Kong and The Killer SharePoint App

    I recently picked up the 2-Disc Special Edition of King Kong. This is the original 1933 grandaddy of them all, not the crappy 1976 POS from Dino De Laurentiis. It's a great disc set for those that are fans of the genre and like this kind of stuff. What was really special was a lost sequence from the film. 

    Back in the first weeks of the films release, there existed a horrifying spider pit sequence. A short sequence after the sailors are felled from the log by Kong and fall into a pit. There in the pit, prehistoric spiders and insects devour the expendable crew. After a few viewings of the film, people were said to have had fainting spells over the horrifying nature of the sequence. The director, Merian C. Cooper, took the sequence out of the film himself (citing that it didn't flow and the focus should be kept on the great ape). The sequence exists in various treatments of the script, there are a few storyboards kicking around, and in the 1970s a photo emerged of a spider from the lost sequence that never was. To this day, nobody seems to have any restored footage for the part of the film (it's said that Cooper might have actually burned the footage, as he was known to do this).

    Enter Peter Jackson and Weta, the special effects magicians responsible for Lord of the Rings. Mr. Jackson is a huge fan of the original Kong (hence one of the key reasons why he's remaking it, coming out December 14). Just for "fun" the Weta team was tasked to recreate the lost spider pit sequence and patch it into the surrounding parts of the film on the DVD. They faithfully rebuilt original models (using an X-Ray from one of the only surviving models available today) and created new ones (based on sketches by Willis O'Brian for Kong) and engaged stop-motion animation, matte paintings, and other techniques used in the original Kong rather than todays typical computer animation techniques. The result is a sequence that the creators would be proud of, a seamless blend of 1932 footage with 2005 filming and gives the fans one filmakers take on what the sequence might have looked like.

    As we know, SharePoint is a technology platform. It's a platform very much like the special effects world of Hollywood in the early 30s. There are endless possiblities that you can extend and expand from. The problem is that we have yet to have a wizard like Willis O'Brian come along and merge the various capabilities of SharePoint into one entity that will stop us from looking at it as a tool with missing features. Michael Ekegren, in his latest blog, wonders about what a SharePoint resource portal should or could look like and what is it you need to do with a team site? There are web parts out there today and the SharePoint technology has been around and maturing for a couple of years now, yet we're still stuck in the stone ages when it comes to usability and functionality. The landscape out there is still just a simple class of Web Parts that provide us with navigation elements to supplement SharePoints simple UI (something that is addressed with the next release).

    What we're lacking is someone to come along and do what PJ and his Weta team did with Kong and fill that gap with something new, finish what was started so long ago. There must be a bigger and better use of SharePoint than just document storage and lists. Sure there are some "killer" tools like SmartPart which makes building Web Parts a breeze but that's limited to people who build things rather than use them. And yes, the next version will allow you to just drop in user controls and have them "become" Web Parts. With the release of ASP.NET 2.0 and the Web Part framework, we'll have 10 months or so of people building new Web Parts that can then be used in a SharePoint Team Site. Still, there's something we're missing here as we have a toolset that has unlimited possiblities but all we're doing with it is enhancing navigation controls.

    Or maybe SharePoint itself is the killer app, and we're just too close to the trees to the see the big monkey behind it.

  • SharePoint Connections 2006, I'll be there

    You know, I swear to god I thought I did a blog posting on Thursday and Friday this week. Hmm. Maybe the mind is going as I shift into old age mode.

    Anyways, just wanted to let everyone know that I'll be speaking at the SharePoint Connections 2006 conference in Orlando April 2-5. The session information isn't posted yet so I can't say specifically what we have cooked up for you guys, but it's focused on SharePoint (of course) with most focus on the current version, but they'll be some talk of the next release. If the public beta is out by then, we'll be able to incorporate those into demos but otherwise it'll be 2003 focused.

    More information to come later as it becomes available. The early bird registration cut-off is February 16 and you can save $100 on the fee. Check out the official site here for more info.

  • Step-By-Step: Personal Web Site Starter Kit

    Okay, I've got a lot of emails from people that read my prevoius posts about using SQL 2000 (or 2005, but not Express) and are still scratching their heads about how the heck do I actually make this work. So here it is. This assumes you are going to be using the Personal Web Site Starter Kit with a remote database (2000 or 2005) and a userid and password rather than integrated security (these instructions also work for the Club Web Site and Time Tracker Starter Kits, although some names are changed to protect the innocent).


    • Install Visual Studio .NET 2005
    • Install SQL Server 2000 or 2005 (any edition except Express)
    • Download and run the Personal Web Site Starter Kit from here


    1. Launch Visual Studio
    2. Select File | New Web Site from the Visual Studio menu
    3. Choose the Personal Web Site Starter Kit from the available templates and click OK
    4. Launch SQL Server Management Studio (2005) or Enterprise Manager (2000)
    5. Create a new login using the user id and password you'll use
    6. Create a new database for your site
    7. Run "aspnetregsql" using the export option (see my previous post here on how to do this)
    8. Execute the file exported in step #7 against the database you created (using Query Analyzer or SQL Server Management Studio). This will provision the database to support the membership provider the starter kit will use
    9. Execute the "personal-add.sql" file found in the AppData directory in the solution against the database you created (using Query Analyzer or SQL Server Management Studio). This will create all the tables and stored procs for your personal site to use.
    10. Back in Visual Studio open up the web.config file
    11. Change the connection string called "Personal" to this: "Data Source=(local);Initial Catalog=;User ID=;Password=" (replacing with the values you decided to use)
    12. Change the connection string called "LocalSqlServer" to the same thing
    13. Hit Ctrl+F5 to launch the site. You should now be connected to your local SQL instance.

    For a remote setup, you'll need to create the database using whatever tools your host has and run the two SQL scripts (personal-add.sql to create the site and the one you exported in step #7). If you're using a remote database, change "(local)" in both connection strings to the servername or IP address you need.

    Clear as mud now?

  • Virtual PC vs Virtual Server

    At the taping of our second podcast show (which should be hitting the airwaves shortly), we were talking about the new Service Pack 2 for Virtual Server and how wonderful it was adding new functionality (as well as how wonderful VS was). I debated switching again. I've been using Virtual PC for awhile and like it. For a short time, I had VS running and it was okay. I did a quick check and reinstalled it and tried out a few things to convince myself it was worth it. I mean, if you're going to be a virtual as I am (which is everything virtual, including myself sometimes) then having a single tool would be nice. The great thing about Virtual Server is that it can read VPC hard disk images and, in some cases, read the VMC files as well so setup was a snap.

    Okay, here's a rundown on the pros and cons I found with both. It's not much and feel free to add your own in the comments section (please don't get into quibbles about VMWare vs VPC or how you have to buy licenses for each OS you run). I'll let you make your own decisions about what's right (and if right means installing VMWare, knock yourself out):

      Pro Con
    Virtual PC Drag and drop files from desktop One icon in taskbar for each VM running
      Resizing window resizes guest desktop dynamically More memory overhead for VPC client
      Faster save state time (at least for me)  
      Sound card support  
      Shared folders from host OS  
    Virtual Server Scalability No drag and drop from host OS
      Better performance over VPC Can't resize guest desktop by resizing window
      Scripting and WMI integration Need web server running to manage VMs
      SSL connections to guest OS

    In the end, I decided to go back to Virtual PC and just keep that setup. Of course screwing around with all my VMC files I had to rebuild them, but it's a small price to pay for the exploration. The big thing is drag and drop. Of course the drag'n'drop is there in VPC because VS is meant to be running on a server, while VPC is aimed at a desktop user and provides visual things like drag and drop. Until Virtual Server add drag'n'drop for the most part, I won't be going back anytime soon. YMMV.

    YMMV - Your Mileage May Vary (or yellow milk makes vitamins)

  • Disparate Information Sources (aka Not Enough Cowbell)

    My previous entry about open source web parts and commercial vendors sparked an interesting response by Michael Ekegren, an IT consultant in Denmark. In it he talks about level of support you get from commercial offerings, the (hope/promise) of future enhancements, and a difficulty for end-users to embrace SharePoint as there's no mechanism to "download and play" like there is for desktop applications. All good stuff.

    However there's a bigger demon lurking under the surface that I wanted to gripe and be angry about. Namely the almost complete and utter uselessness of Microsoft's Web Component Directory (and others like it). Okay, Microsoft had a great idea out of the gates with this. A central directory where authors can upload content (components, training, documentation, etc.) for SharePoint, and consumers can search and download it. Nice and all sounds good on paper.

    I went on there to check out what's new. They have a nice feature to show you the latest entries uploaded. However of 5 latest "components", 3 of them simply redirected me to a vendor site where I had to fill out a request form to get a demo of their software. Hardly user friendly from my perspective. I mean, what would you feel like if you looked up in the web pages the name of an automobile parts shop only to find when you get there you have to fill out a bunch of forms and they'll call you to later when you can come pick it up (or have it delivered). Maybe it's the instant gratification guy in me but that just blows chunks. In other cases, I get sent to a vendor where I can "apply" to view a demo. Again, this isn't a very optimal use of anyone's time. If I wanted to see a demo of something I would have gone to the vendors site in the first place, not through some 3rd party site where I thought I was going to download the goods. Yes Bil, not everything can be downloaded blahdy, blahdy, blahdy, blah. Oh yeah, also there are close to 40 "components" but they're part of standard Microsoft packages (like Great Plains, etc.) so having them available in the directory is useless because they won't work without the product installed (and if I had the product installed, I wouldn't need the Web Parts because they come with the product install, sheesh).

    Recently the GotDotNet workspaces got an overhaul and they even have a dedicated area for SharePoint, however it also falls short IMHO. I mean, best of intentions and all but implementation is a little off. I mean, it's great they have a section for SharePoint, but it's almost information overload with what's presented there. Everything is on one page (albeit split up into sections) with what's new, workspaces, web parts, code samples, newsgroups, developer tours, downloads, FAQs, trials, sample sites, technical information, training, seminars, webcasts, and related sites (whew). Also it's pretty much impossible to search on GDN and get half decent results. Also there are some (many) workspaces that I have to apply for membership just to download a tool or web part. Again, not very user friendly IMHO.

    Having said all this, I just don't think it's quite there yet. There are some resources that are great (kudos to some like SharePointCommunity for setting it up) but like that automated file viewer I was looking for, it's just not what I'm after. Maybe I'm alone but I think we, as SharePoint geeks and nerds, deserve better. I believe that the SourceForge guys got it right (mostly). Easy search with results. A software map to be able to drill down and find something topically. Everything open and avaiable and a pretty simple mechanism to both create new projects and apply for membership to one, should I decide to help out. SharePointCommunity is a great resource but again, I look at things from a working perspective. What do I need to get my job done? I am working on, spinning up, and launching, something that I've talked to several people about and hopefully will come to deliver what I believe is a gap in being able to share and collaborate on what is touted as the premium collaboration platform, namely my SharePointForge project. Okay, it might fall flat on it's face coming out of the gates, but what's YASR out there?

    YASRS - Yet Another SharePoint Resource

  • Wrapping up ASP.NET Providers and remote setups

    Just wanted to follow up (and close off the thread) after doing some testing and working with some remote hosts that have ASP.NET 2.0 services available.

    In my previous post about the ASP.NET provider, I had pointed out that you need to override the LocalSqlServer name with whatever you wanted (if you were not using SQL Express as it was the default). At the time I was also unsure about how to setup your provider database remotely but Roger Bedell posted in the comments that you needed to run a series of scripts.

    Actually there are a few options here. The main thing is that your new best friend is going to be aspnetregsql.exe (which lives in the C:\WINDOWS\Microsoft.NET\Framework\ folder). In order to setup a remote database, you'll need to run this and have it generate some SQL scripts for you to execute on the remote host.

    If you run it with the -sqlexportonly option, you'll need to provide what features you want to turn on (or off). -A all will turn them all on (membership, role manager, profiles, and personalization). So run this from the command line:

    aspnetregsql -sqlexportonly -A all

    This will create the following scripts:

    09/23/2005  06:28 AM            24,603 InstallCommon.sql
    09/23/2005  06:28 AM            55,833 InstallMembership.sql
    09/23/2005  06:28 AM            52,339 InstallPersistSqlState.sql
    09/23/2005  06:28 AM            34,950 InstallPersonalization.sql
    09/23/2005  06:28 AM            20,891 InstallProfile.SQL
    09/23/2005  06:28 AM            34,264 InstallRoles.sql
    09/23/2005  06:28 AM            52,123 InstallSqlState.sql
    09/23/2005  06:28 AM            53,895 InstallSqlStateTemplate.sql
    09/23/2005  06:28 AM             6,457 InstallWebEventSqlProvider.sql

    Like Rogers' comment, you need to run them in a particular order. However if you run the command with a filename you'll get them all in one single SQL script so run it like this:

    aspnet_regsql -sqlexportonly MyProvider.SQL -A all

    This will create a single file, MyProvider.SQL, which you can now paste in/upload and execute on your remote server. I've setup a few test systems on both and WebHost4Life and they work perfectly.

    So that's it for getting your provider model setup remotely when you don't have access to the command line on the server. Enjoy.

  • Ready to Rock now?

    Hope everyone in Calgary had a great time at the launch event yesterday. It was a blast and we had a lot of fun hanging out in the Cabana, answering questions, mocking up crazy architectures on the fly, and generally having a great time. It's always cool when so many people get together with the same interests (even if it does rank way up there on the geek meter). I got there pretty early so wandered around until things got setup. The keynote was fun (complete with various pokes at Oracle) and the day went by pretty quickly.

    Lunchtime rolled around and I swear I still don't know the intention of the whole sandwich thing. I mean, it said "Three 1/2 sandwiches per person limit". Now is that 3.5 sandwiches or 3 separate 1/2 sandwiches? It still bugs me today but I'll get over it. A few cool prizes were given out (including a "We'll mail you an XBox 360 for one lucky guy" prize as there were no units available at the show).

    Although by now you've gone through your swag and maybe need to go back and visit it again. Why? Because not only did everyone get a free copy of Visual Studio 2005 Standard Edition AND a copy of SQL Server 2005 Standard Edition you also got a certificate for a free Microsoft exam (five choices to pick from) which you can use towards a MS certification. That's a value of $150 bucks. Sweet deal.

    Anyways, it's out there. John Bristowe is off to various other places for the remainder of the month to finish off the tour. We'll be recording our second episode of the DotNetPlumbers podcast show tonight so hopefully he'll recover enough for next weeks trips.

    Like I said, it was a great time (even if we did look like WalMart employees). You can check out all the pictures from the Calgary VS 2005 Launch here.

  • Yahoo!

    No, not the mega-corp that provides home pages, search, and other goodies to millions of internet users. I'm talking about the Yahoo! that we scream when cool events take place in Calgary.

    It's launch day for the Visual Studio tour! We had our VIP reception last night. Below is Daniel C from the Calgary.NET Users Group (also a MVP) with Dan Sellers from Microsquishy and J.P. from Thoughtworks. The second pic is me with Frank from Quadrus and John "I'm gonna rock" Bristowe. I'm off to our breakfast now, ready to get outfitted in our cabana boy outfits. John was sporting a bit of cold last night, but he and Joel Semeniuk are ready to rock for today's event. Anyways, I'm off to hang out and generally pontificate about cool .NET things so drop by the Cabana and say Hi.

    Bonus Info for attendees: Besides getting a free copy of Visual Studio 2005 at the event, be sure to get your eval forms filled out and handed in because we're giving away (drumroll please) an Xbox 360! Rock on.

  • Pre-loading your VM for SharePoint Development

    Figured I would continue to bloat about using VMs with SharePoint development as some people have been reading my posting and AC's and been adjusting their environments.

    A couple of things about my setup. My machine names are all named SPSDEV. If anyone knows why this is a problem, raise your hand now. Okay, times up. Yes, if you rename a server then your SharePoint will break. This is because the names of the content databases and various other config info is kept in the database and thus a rename will break this as the name of the server won't be known. There's a quick fix (which I don't follow myself but I'm pretty sure it works) and that's to just add the new name in your HOSTS file and have it point to Again, I haven't done this myself as I go through the somewhat painful steps of really renaming a server. If you're into self-abuse, here are the instructions on doing this courtesy of Microsquishy.

    The next thing is to get your image ready for copying and set everything up before you copy it. This is so when you launch it you won't have to install software and configure things that are important. So a few key things to do:

    The default desktop on servers is boring and I usually go in and add My Computer to it so I can quickly get to the Manage and Properties options. Your choice but it saves time.

    Environment Variables
    Personally I'm a kinda command line guy so when you launch the command prompt and type STSADM it should work. Well, this isn't a normally pathed location so add it. Right click on My Computer, choose the Advanced Tab, click on the Environment Variables button and add the bin folder of the 60 hive (you really don't want me to type that out do you?) to your path.

    I also put a couple of shortcuts on my desktop like a shortcut to the 60 hive folder. Handy for dragging files there and generally doing quick little tasks.

    My favorite thing is tools so a few that you should include on every single solitary SharePoint setup you have:

    • SharePoint Explorer. The best thing since sliced bread as you can look at sites, see what is there and dig around in the properties that you can't get at through the Web UI. Invaluable. Best of all, it's free!
    • InstallAssemblies. Great tool from Blue Dog that you can launch and just add your SafeControl entries for your Web Parts and copy the files to the bin directory. Beats the heck out of running a CAB project and doing things by hand. Will also create a CAB file for you so...
    • SharePoint Configuration Analyzer. Nice tool that will tell you pretty much everything about your SharePoint setup and point out anything that's amiss (like assemblies not signed, missing templates, etc.)
    • CAML Builder. From U2U. A great tool to help you decipher CAML and do queries against your lists to see if what you're writing will work. Also contains an assembly that you can save your queries in Xml format and launch from your applications or Web Parts.

    There are others (and people have huge lists of tools to have). These are just ones that I never leave home without. So remember to load up your image with your tools you need (Visual Studio 2003 and the Web Part Templates if you're going that route) and when you launch your VM for the first time, you'll be all set to go.


  • Open Source Web Parts, XBox 360, and VS2005 Launch

    A bit of a mish mash (miss mash? miss match? Alicia Silverstone?) today as my brain recovers from an incredibly boring orientation session yesterday that I was forced to attend. Note to HR peoople, even though I got paid for my time, I would like those 4 hours of my life back somehow. The thought of reading through another policy manual in a class just sends shivers down my spine.

    I'm thinking about dropping by the local Future Shop/Best Buy/etc. to see if there are any 360s for sale. They hit the stores today but I'm the type that would never pre-order something (instant gratification is key). So I'm wondering if I'll be able to find one in Calgary? Is the "shortage" all hype or would all outlets really be sold out? If you're in Calgary let me know.

    Next up is about Web Parts (and SharePoint tools). I have amassed in my little collection about a dozen little tools that I've put together for doing various SharePointy stuff (like applying themes across an already themed farm) and other goodies like Web Parts. For example I have a Web Part that I built after being inspired by the FabriKam Multi-Doc Viewer so it rolls up multiple documents on multiple document libraries on multiple WSS sites.

    Anyways, while sitting on a gigabyte of code might be a cool thing to boast about (I wouldn't know because I think it's a little too over the top in the geek factor to do this), I'm trying to gauge what would happen if I release this stuff into the wild. These are things that I've put together on my own time as I found gaps in what SharePoint does, wanted to try out a new control, or in response to a quip in a newsgroup where someone spouts the magical words "does anyone have a web part that...". The Visual Xml SharePoint Builder tool is one of these.

    The dilemma is that I'm not sure the response that might result from some established vendors who have similar products out there where they are making revenue from it. Far from me to step on anyone toes (commercial product or otherwise) and I'm not saying my simple little things are something an Enterprise should bet the farm on (for example, I'm not in any position to provide support for this stuff). It's just that as I look across the "commercial" SharePoint Land I can see a lot of vendors that might be peeved if Bil opened up the flood gates and unleashed the hounds.

    Maybe I'm just overthinking all this so looking for some feedback from you on this. If you sell a SharePoint Web Part or tool, what would your reaction be if a similar (or better) tool shows up, for free, on the wub wub web? Or a Web Part that did pretty much the same as one that's making you money? Should I expect a nasty email or would you just ignore it? Inquiring minds want to know.

    Finally the VS2005 Canadian Launch in Calgary is coming up on Thursday. From the rest of the Canadian events, John Bristowe and co. have been doing a killer job on the launch and it just gets better with each city. Having Calgary later rather than sooner and after a few other big cities like Toronto and Vancouver just provides us with more cool factor (take that T.O.). Hope you have your tickets and we'll see you at the Cabana (remember to bring any extra organs you might have).

  • ASP.NET 2.0 and the Provider Model, without SQL Express

    By now, a lot of people have got Visual Studio 2005 installed (or maybe Visual Web Developer Express which is free for a year so grab your copy now) and are building web apps like there's no tommorow. When you install VS2005, you end up getting a bonus. SQL 2005 Express (or is it SQL Server 2005 Express? I can never remember names.) which is basically a new 2.0 version of MSDE. This is again very cool and an easy to use tool. Problem is that for some of us (and maybe I'm the only one) a lot of things people will be telling you (and tools you download) are setup for the VS2005 and SQL 2005 Express installs. For those of us that have a copy of SQL Server 2005 Developer Edition, there are some extra steps to get things working, namely in using the new ASP.NET 2.0 Provider Model.

    Take for example the Starter Kits that Microsoft was touting at the launch (complete with straight-A college student building her website for a rock band called "The Windows"). These are great samples of code that you can run and create a new site with. In fact when you install them and create a new site one of the things the Welcome page in the IDE will tell you is "This site is ready to run! No changes are needed. Press CTRL+F5 to run the site". Ummm. Not quite for those of us, again, without the SQL Express setup.

    The Starter Kits (and something your own apps should leverage if you're wise) use the ASP.NET Provider Model, a fancy way of handling security for your application by letting you setup roles, users, etc. Of course, all this information needs to live somewhere like, hmm, a database? (There are other providers you can hook up to things like ActiveDirectory). For the database method, you need to provision your database using a tool called aspnet_setsql.exe. This tool will create a series of tables in the database you specify so you just call some simple methods in your code (or through web.config) to restrict areas of your web application. Very slick and very handy. Get to know the Provider Model if you haven't looked at it yet.

    Two things these starter kits will do is to use a local MDF file in the App_Data folder (another really cool thing ASP.NET does BTW, creating databases on the fly) and will tie you to the SQLEXPRESS instance name. Fine if you did the brain dead install but if you need a bit of a shove in the right direction (aka using SQL Server 2000 or 2005, not Express) then you need to do a couple of things. First, let's fix the connection string in web.config. By default (for the starter kits) here's the connection string it uses (this is from the Club Starter Kit):

       <add name="ClubSiteDB" connectionString="Data Source=.\SQLExpress;Integrated Security=true;AttachDBFileName=|DataDirectory|Club.mdf;User Instance=True" providerName="System.Data.SqlClient"/>

    So this creates a connection string named "ClubSiteDB" with a data source (much like a regular connection string) but then uses a features of ASP.NET "AttachDBFileName" which will look for a database file called Club.mdf in the DataDirectory (App_Data by default). So let's change this to use a typical connection string you would use if the database was in SQL Server:

       <add name="ClubSiteDB" connectionString="Data Source=(local);Initial Catalog=ClubSiteDB;Integrated Security=true" providerName="System.Data.SqlClient"/>

    Okay, so now it's connecting to our local SQL Server (this could be a remote name or IP address) and selecting the ClubSiteDB database. Next you need to provision your database to handle the membership and role provider. You do this by running the aspnet_regsql.exe program (from your C:\WINDOWS\Microsoft.NET\Framework\2.0\blah blah blah directory). This launches a little GUI to select the database and set it up. It's fine to set it up into the same database for your site, unless you prefer to have a separate one. Some remote hosts only let you have one database file so you decide, just be cautious of the table names and such).

    Once this is setup two things are going to happen. First, you'll be able to selected the Security tab from the ASP.NET Configuration page now (previously it would give all kinds of errors like not being able to register stored procs and such). Second, you can use the Provider model in your app. You'll need to do two small modifications to your web.config to finish this off.

    Add the following just below your modified connection string (still inside the connectionStrings tag):

       <remove name="LocalSqlServer"/>
    add name="LocalSqlServer" connectionString="Data Source=(local);Initial Catalog=ClubSiteDB;Integrated Security=true" providerName="System.Data.SqlClient"/>

    This name LocalSqlServer isn't just something I made up because it sounds cool, it's the name that ASP.NET will be looking for and one that's hard wired into your machine.config (thanks Microsoft!) if you had installed SQL Express (even if you didn't install it, the setting is there, yeah, very zen like). Second, you can override the Membership tag with your own personal preferences and take it from this:

    <membership defaultProvider="AspNetSqlMembershipProvider"/>

    To something like this:

        <remove name="AspNetSqlMembershipProvider"/>
        <add name="AspNetSqlMembershipProvider"
         type="System.Web.Security.SqlMembershipProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

    Key here is to use the LocalSqlServer name for the connection string. This will allow you to tweak the way your provider works. If you're using SQL Server 2005, things are a little secured down (by default) so if you don't set values like minRequiredPasswordLength you'll end up having to sucumb to the big, bad security settings and come up with a 215 character strong-password that isn't the same as your last 1024 ones. This just makes it a little easier for newbs, but feel free to use the default values.

    That's about it and should hopefully get you building things rather than scratching your head wondering why you don't have access to your local machine. The Provider Model is probably one of the coolest features of ASP.NET because, with it, you can build secure web sites with various roles tied to security trimming the user sees. Hook that into using Master Pages and Web Parts (not SharePoint) and you can create a very dynamic site that's secure and fun. This information can be used for any ASP.NET 2.0 web app if you're trying to use your SQL setup and ASP.NET membership and role providers. Just remember:

    1. Make sure you have the connection string setup correctly
    2. Run the aspnet_setsql.exe program to setup your membership and role data in the database
    3. Add a LocalSqlServer connection to your web.config

    The only trick I'm working on now is how to do this remotely where you can't access the command line to run aspnet_setsql.exe (like where your hosting is remote). If someone has an answer let me know in the comments.

    PS Scott Guthrie has an MSDN article on this that I found which explains some/most of what is here. Of course I discovered this while I was writing this post, but hey, what's another blog entry anyways. You can see Scott's article here.

  • Looking for something

    I'm stumped. Yes, the Google whore that I am cannot find something. For years I've been using Midnight Commander on my system to view text files (code) and generally move around (grown up from my days with Xtree-Pro in DOS). Now I'm finding that I'm actually becoming just as (if not more) productive using Windows Explorer (plus the fact that half the time I can't do something with MC so I end up typing "start ." and do it in Explorer).

    However for the life of me I cannot find an Explorer add-in that will do something what I think is simple. Autodisplay the file in the big bottom right corner of the Explorer window. Just something simple. If it's a text file, just show it to me. If not, then the file details would be fine (bonus points if it could view image files). Yes I know there are goobers of Windows Explorer replacements but I don't want that. I'm looking for some shell integration that will just be there.

    Anyone know of such a beast?

  • A different take on organizing virtual disks

    Recently Andrew Connell came out with a pretty lengthy article on how he organizes his work with Virtual PC and differencing disks. It's a good article and goes quite in depth into his setup. For me, I live, die, and otherwise breathe by my VPC images so it's something I'm always interested in. I'm not going to get into a "My Virtual environment is bigger than yours" discussion but the thing that I don't use is differencing disks like AC does.

    My setup starts with installing a core OS (Windows Server 2003) to which I add on a web server role (IIS 6.0) and all the latest patches and service packs. This machine is called "BASE" and not joined to any domain. Anytime I need a setup, I copy the VHD and create a new image. Yes, this chews up disk space unlike differencing disks however the problem with differencing disks is that once you change the base disks you invalidate the entire tree of child images. AC gets around this by applying patches to his child disks but then I have to wonder how much effort that is to keep everything up to date? Personally I use SMS and my own update server that has all the latest patches and fire up the VMs to connect to it locally every 2-3 weeks.

    I also take each image and add some common tools (like BGInfo from Sysinternals which is a great tool to show you information about your server as a background wallpaper, get it if you don't have it already) and bake that into the image so it's ready for the next copy. I also take the base image and add in Active Directory service and DNS to make a domain controller ( which I run with 256MB of RAM in case I want to attach any of my SharePoint images to it for domain type work (complete with a VBS file that builds my AD tree and adds about 100 people to the domain in various roles, all taken from zombie movies on

    Finally any servers that I want to do development on I just install the tools I need. I do have child disks (just a copy) of Windows 2003 Server with SharePoint, SQL, and Visual Studio installed for development as it's a 2-3 hour install for this setup. So for new SharePoint projects I just copy this image instead of the empty 2003 Server one (and optionally connect to the domain if needed using sysprep) and I'm ready for Web Part or tool development. How many portals and SharePoint type environments do I use? One Windows 2003 Server/SharePoint/VS2003/SQL dedicated image for each unique client I have and my own personal sandbox image for doing community work, pet projects, etc.

    For some work (like Office 12 client or Windows XP) that I don't want to mess with on my desktop I have a Windows XP client that I kick around. All of these are connected to a virtual network that VPC creates and manages so they can talk to each other. For the most part I only ever have 1 or sometimes 2 VMs running at once (in the case of running the domain controller) with XP running sometimes if I'm doing client development or don't want to use IE on my SharePoint server to view the site (sometimes it's a pain when connecting as IE on the server always complains about security, blah, blah, blah). On my laptop I have 2GB of RAM so I give 1GB to any SharePoint/VS 2005 setups and end up leaving about 512 for my host OS. It can get tight, but I've never had a problem. All of my desktops run at 4GB so I usually give the SharePoint dev 2GB (or more) as I'll be doing debugging on this and these are usually running SQL Server Developer Edition so chew up a lot of RAM.

    Currently I use external Iomega Hi-Speed 80GB Desktop Hard Drives for my VHDs and keep about 30 of them stored, ranging from the base image files that I copy whenever I need a new server to my working environments (SharePoint, VS2005, etc.). The main thing is that you really need to keep the images separate from your physical disk that your host OS runs on for performance. I also keep all my development code on this external drive so wherever I am and whatever machine I'm using (desktop, laptop, etc.) I have all my code with me (which is backed up on a daily basis as external drives has been known to fail). This folder is shared on all Virtual PC setups as Z: so it's easy to access in any virtual server.

    It's a lot of images to maintain and maybe I don't make best use of disk space but at less than $1 a GB who cares? Whatever works for you.

  • Grrrr. Argh.

    Okay, it's been a week since I blogged. Bless me readers, it's been a tough week.

    Anyways, a couple of updates. The closed beta for SharePoint Builder (my visual xml tool) is launching shortly. If you're in the beta then hang on to your hats. If you're not in, please stop sending me emails asking to get in. Closed means closed. Thanks.

    Beta 1 is "officialy" released for Office 12 but this really irks me. Here's the news on BetaNews which is appropriate, however the announcement also hits the front page of Slashdot. This is a closed beta not a public one so why are so many places reporting it? If you're not one of the lucky 10,000 winners of the golden ticket, then you'll have to wait until March or so when the public beta comes out. It's like a slap in the face as people say "nyah, nyah, you can't have it" but then titilate your senses with these full blown reviews. Anyways, BetaNews has a good summary of what's included and the size of all the tools (which is handy for those that are planning their downloads).

    John Bristowe and co. are pretty busy with the VS2005 launch so we haven't got together for a new podcast yet, but from the 2 listeners we had we'll probably get together and give it another kick at the cat. Watch for Episode II shortly (you can totally see where this naming convention is going). Also I will be at the VS2005 launch tour in Calgary (sorry folks, it's sold out now and even Bill G. himself can't get you in) so drop by the cabana and watch as we perform live organ transplants with James Kovacs and any unwilling MVPs.

    Finally I have a new site launching this weekend (or early next week) that I'll blog about shortly. It's my pet site project for hosting SharePoint oriented projects. I think it's going to be pretty slick but we'll see how things go.

  • Buy the Ticket. Take the Ride.

    Hope everyone is geared up for the VS2005 launch! Steve B is about to go onstage in San Francisco in a minute or two with the keynote speech (Developers, Developers, Developers, anyone?). It's going to be blast!

    The Canadian Launch starts tommorow with my good friend John Bristowe doing the honors of presenting all kinds of crazy stuff on centre stage. The launch starts in Toronto tommorow (November 8th) with it continuing throughout most of the month (John's in for a lot of airtime).

    If you had the opportunity to check out TechEd the concept of Cabana's was flying about like a wild ride. You stop in, talk to some softies, MVPs, and otherwise knowledgable gentlemen about anything you want. Something you saw at the main presentation. Something you want to do with Visual Studio but can't. Something that bugs you about SQL Server 2005. Whatever. Anyways, it's a more relaxed atmosphere and we have some whiteboards and whatnot for you to sit back, relax, and have some fun. So drop by the Cabana's for some cool fun or just to talk. The Calgary launch is November 24th so hopefully you're hooked up already. I'm also at the Edmonton Launch on the 15th and there are some VIP dinners the night before each launch so if you're going to be at those, keep a clear line between me and the cheesecake if you want to make it to your next birthday.

    BTW, if you're registered for the event you're going home with a special copy of VS2005. Yup. Free. This is not the current free Express edition, but a real, full blown (non-expiring) edition of the IDE. So after you get home from the event you'll be able to start building 2.0 apps immediately. How cool is that?

  • Like the World Needs Another Podcast

    Well actually, for you it's start up your favorite MP3 player. Yes, I've dived into the deep, dark quagmire called podcasting. Together with Dan Sellers, John Bristowe, and James Kovacs we've launched a new podcast on .NET (like the world needs another podcast). John pitched the idea to us about doing a podcast (similar to .NET Rocks! but more techy and laid back) a couple of months ago. A few weeks ago we gathered in John's abode to commit our voices to the airwaves and a legend was born. Uhh, yeah.

    It was a fun time and I'm hoping the podcast will be entertaining or informative to some. Be kind as it's our first foray into podcasting so other than the various technical glitches in the podcast I think it came out okay (as okay as one can sound without being completely boring). There was some discussion on SharePoint (briefly) but most of the podcast was focused on the VS2005 launch and the .NET 2.0 framework (with some bad Xbox 360 and Microsoft Bob jokes thrown in for good measure). If there's interest (and we hope there is) we'll continue this on a somewhat regular basis so feel free to leave your feedback in the forums and subscribe to the feeds to stay updated (yes, yet another userid/password you'll have to remember).

    You can check out our Plumbers @ Work site here and try to live through the first episode here. This should be available on the MSDN audio site shortly as well.

  • Secure Custom Views for Everyone

    This came up in the newsgroups and is a common thing that people want so I thought I would share it here (as the newsgroupie was happy with my solution).

    Since the dawn of the SharePoint 2003 man, views have been ways to filter information. Of course they're public views for everyone to see. But what if you want to have views just to show data filtered by a user (for security reasons). The first answer would be "Well Bil" (as I often refer to myself in the third person) "you could just have everyone in the company create personal views and they would be, well, personal". Uh yeah. Okay, two problems with this. First, while they are "personal" they're also "public" if you know the URL to get to them. There's no security on them whatsoever and security through obscurity just doesn't cut it. Second, having everyone in a company (unless you're a company of 10) isn't really feasible. We need a better way.

    Enter the [Me] filter. Yup, plain old silly little [Me] that we see in the help files for creating views. Lets say you have a list of Sales results and for whatever reason (yes, I've seen this in organizations before) the powers that be don't want Sales Guy #1 (Joe) to see Sales Guy #327 (Ricardo) information. We have a list with various Sales figures but we have a cool thing called "Created By". This is the built in field that tags the item in the list with the name of the person who created it (makes sense doesn't it?). So now we can go into the default view and add a filter. Select the "Created By" field as the filter and enter [Me] as the value it has to equal. Voila, Abbacadabra, and Presto Chango. The view now only shows Joes sales figures to Joe and Ricardo's to Ricardo. Magic huh?

    If you need an "admin" view then you can just create a personal view that doesn't have the filter and do something like group by the "Created By" field. Okay, so you're looking at your browser and saying "But Bil, you just told me that the personal view isn't personal and anyone can see it". Yes, well this is SharePoint and doesn't always provide the best solutions for everyone.

    An alternative that you can do though to really hide this info is possible (hide as in your security guys won't be beating you upside the head if you create a personal view). Create a new document library and give whomever access you want to it. These would be the important people with Armani suits that want to see all of the sales figures just because it's part of their performance expectations for the year. Now create a new Web Part Page and put it in this library. On this Web Part Page drag the Sales list onto it. Crack the page open in FP2003 and convert the list to a DataView Web Part (oh yeah, you're getting it now right?). Now apply whatever filters you want to the list and save it. Since the Web Part page is in a Document Library, the security is applied to the library so Ricardo and Joe won't be able to see it but the big, powerful execs will. Problem solved (I hope).

  • More VS2005 goodness and launch events galore

    Okay, the posts are probably going to be fast and furious (sans Vin Diesel) for the next month or so as we kick off the Visual Studio 2005 launch (and throw in the appropriate SharePoint info here and there). If you're still waiting for your MSDN download to complete (like I am) then you can check out the 2.0 Framework download here or the SDK download here. This is the final version stuff so get developing! No more betas, no more release candidates, no more what flavour of product x should I use with framework y?

    Also if you haven't already signed up for the 2005 Visual Studio Launch Event I urge you to do so now. Seats are filling up across the country so some places are in waiting mode now. This is the biggest launch event in Microsoft's history and frankly, the products just kick ass (go ahead Eclipse and Java guys, slam me all you want). The main launch event page can be found here. Sweaty Steve Ballmer is going to be kicking it off in San Francisco on November 7th. I saw him at the MVP Summit as he gave the keynote there. Steve is an excellent presenter and really gets the crowd going.

    As for the Canada launch, it kicks off November 8th in Toronto with lots of great stuff. I'll be working at the Calgary event at the Stampede on November 24th (and maybe head up to Edmonton for the launch there on the 15th) so come by and have some fun. We're going to be doing some cool stuff at the launch with the Cabana idea that started at TechEd. Basically an informal area where you can sit down, talk about VS2005, SQL Server 2005 or whatever (yes, SharePoint) and relax with some MVPs and Microsquishies. We'll have some whiteboards setup and be there to answer questions, talk about the new products, and whatever else strikes your fancy. It's going to be a blast.

    Like I said, lots to post on the new products, on what's going on in SharePointLand (especially with 2.0 support now [well, except for SPS]) and other goodies going on. So stay tuned for some cool stuff.

  • Visual Studio released into the wild!

    Just found out that the release version of Visual Studio 2005 and various goodies are now available on MSDN Downloads. This includes Visual Studio 2005, Visio for Enterprise Architects (2005), and SQL 2005. These are the standard and professional editions of VS2005 but not the Visual Studio Team System line.

    Gentlemen, start your engines!

    Thanks for the IM AC!

    EDIT: I managed to download SQL Server 2005 and Visio but couldn't get the IDE before both MSDN and the downloads turfed. According to Microsoft they are working on it but expect to get your download later with the other products coming online within a few days as well.

    EDIT 2: DVD images are now online and the download site seems to be functioning again. Hope there's nobody on dial-up that's trying to get this stuff. Also watch for some cool announcements next week about VS2005 and what's going on in my corner of the world.

  • The Value of SharePoint Blogs

    How much is a SharePoint blog worth to you? Based on some research by Tristan Louis on how much a blog is worth (based on linking, popularity, phases of the moon, whatever) Dane Carlson wrote a small applet that will calculate the value of your blog. Just input your blog's URL and it comes back with a value and a small snippet of HTML you can put on your site. Here's mine:

    My blog is worth $45,727.74.
    How much is your blog worth?

    While it's completely silly and who knows what the calculation is based on, my blog showed up to be worth about $45k. Fitz came in at $44k so not sure if that's good or bad. Anyways just for kicks, I wasted 15 minutes of my life and here's the rundown on how much most of the SharePointHeads blogs are worth (in descending order of value, just so we can show up each other in our little circle of freakness).

    Blog Value
    Jan Tielen $72,825.66
    Patrick Tisseghem $52,502.22
    Bil Simser $45,727.74
    Mike Fitzmaurice $44,598.66
    Daniel McPherson $35,566.02
    Andrew Connell $33,307.86
    Angus Logan $32,743.32
    Serge van den Oever $29,356.08
    Mart Muller $27,662.46
    Mads Nissen $27,662.46
    Dustin Miller $24,275.22
    Amanda Murphy $20,887.98
    Bill English $12,984.42
    Arno Nel $10,726.26
    Mike Walsh $9,032.64
    Bob Mixon $8,468.10

    So next time one of us spouts off perls of wisdom just remember that you're getting high priced information for free (based on this incredibly scientific system, can you feel the sarcasm dripping from your browser yet?). BTW, Scoble's blog (which some say is the mother of all blogs) comes in around $2.2 million for comparison.

    Yeah, it's shaping up to be a slow week.

  • Stupid SharePoint Tip #3,472,893.1

    My blog was getting lonely so I thought I would post a quick tip for people.

    By default, when you create a new sub-area in SharePoint Portal Server (off the Home page) it will be a content area. From there you can create sub-areas and whatnot but what if you want the new area to use the News template? Or one of your own custom ones?

    1. Navigate to your Portals home page
    2. Click on Change Settings
    3. Click on the Page tab
    4. Change the Subarea Templates option to be able to use any template

    Voila. Done. Now when you create a new subarea off the home page, it'll ask you what template you want to use for it. I don't know how many times I keep having to do this when I setup a new dev portal and how much frustration it brings me that I have to blow away my area, change the setting, then recreated it.

    This Official SharePoint Portal Server Tip brought to you by the letter "P" and the number "42".

  • The differences as described by Susan

    I don't often point my blog to other peoples but I thought this was relevant (and way overdue) and it was a Sunday afternoon and I'm not wearing any pants. Susan Bradley, our SBS Diva, has posted an excellent comparison of plain-jane WSS against Small Business Server (SBS) and it's use of WSS here. As with most Microsoft products coming out these days (VSTS, Navision, CRM, Project Server, etc.) they all use WSS for their document sharing and collaboration junk. SBS is no exception and Susan nails the differences between the two in a nice entry. This question comes up a lot and there seems to be a lot of bickering about WSS vs. WSS on SBS so hopefully this clears things up as they are really the same thing, just configured differently. No magic. No mirrors. Just options. Go read. Now.

  • Tidbits of scatterings of morsels

    Just a bunch of little things to update on where things are at here. First off, thanks for the excellent response to the beta request for SharePoint Builder (I really need to come up with a better name). It was overwhelming so I had to cut it off so please don't send in any more requests to be on the beta. We have a very large and very excellent group of people who are going to beat the crap out of it (including some softies, thanks guys!).

    I have a few presentations planned over the next few months and into 2006 that I'll be showing at upcoming conferences. I have to put together a list but I'm pretty close to having something like a 6 month list of where I'll be and what I'll be presenting. Should be a fun, whirlwind tour of various places I haven't been. Lots of SharePoint stuff and talking to people and whatever other trouble we can get into.

    Some people have emailed me about the missing "deep dive" posts I was so pumped up about. One of the problems with software that's in alpha or beta stage is that the creators, at any given point, may decide to drop features, change screens, etc. Something I was trying to avoid with the blog series was to show you something that might change in the future. The last thing anyone wants is someone quoting my blog from 6 months ago saying "Well Bil said it had this feature or that button" yet it isn't there in the final product. At this point, V3 is too young to be talking too much in depth about as things are changing, some things are completely missing in the UI, and others will eventually come with time. So I've put those aside for now and when the public beta comes out (sometime early in 2006 last time I heard) then I'll dust them off, update them with the current build and present them so you guys can work with them interactively with the product itself. Should be fun but to avoid the pain and suffering I'm just going to hold off on them and keep feeding you guys V2 stuff for now. Yeah, boring but hey, nobody said it was all glamour and glitz.

    And for the love of all that is holy, someone tell me where I can get a copy of Stubbs the Zombie for the XBox in Calgary? It came out today but for whatever reason (that can only be pure torture for us zombie game freaks) we can't find it anywhere. EB Games says they'll be getting it in a week. A week! What's up with that?

  • SPS SP2 Now Available for a limited time offer

    Fast on the heels of the WSS SP2 release, Microsoft now brings you SPS SP2. In case you're confused about the letters, this is Service Pack 2 for SharePoint Portal Server. Yup, now you can have SP2 goodness with both WSS and Portal Server (remember kids, they are two different things). First off, here's the link so start your downloads.

    The following Knowledge Base articles provide information about the various fixes included in this service pack. 

    • KB 887623 Description of Microsoft Office SharePoint Portal Server 2003 Service Pack 2
    • KB 906337 Issues that are fixed in SharePoint Portal Server 2003 by SharePoint Portal Server 2003 Service Pack 2
    • KB 907763 SPS requires ASP.NET 1.1 be installed on the server if ASP.NET 2.0 is also installed.
    • KB 907377 How to address the case where SPS SP 2 does not updated the databases during service pack installation

    Additionally, SP2 introduces support for the following:

    • Support for running on 64-bit machines in 32-bit emulation mode
    • Support for Reverse Proxy and Alternate URL support
    • Support for IP-Bound virtual servers
    • Support for off-box SSL termination
    • Support for SQL Server 2005

    Lastly, SharePoint Portal Server 2003 with SP2 will be Kerberos-enabled by default. Goodness. Now your entire WSS and SPS installation can be fruitful and multiply.

    Thanks to Ryan Rogers for the info on this release.

  • Additional SharePoint and SAP Info

    Ted Teng, who's been contributing a lot to SharePoint (especially his MSD2D articles), is posting a short series on connecting SharePoint and SAP. I had the (mis)fortune of having to do this with a previous project I was on (can you tell I loathe SAP?) and while it's interesting, having to deal with SAP (at least in our environment) was just plain painful. Having no .NET developers on the SAP side of things didn't help as I just wanted to call a Web Service but unfortunately we had to interface to the BAPI calls and thus the whole .NET connector garbage is there. Ted's posts can be found here (Part I: Setup) and here (Part II: Defining the Proxy).

    Anyways, just a couple of things to add on Ted's posts. His IT guy said in his first post "It would require no additional server components. Your .Net Applications would communicate directly to R/3 46C via RFC with the inclusion of a single Assembly DLL." In the immortal words of Albert Nimziki, "Uh... Mr. President. That's not entirely accurate." In addition to having to deploy the SAP.Connector.RFC.dll we also had to deploy the SAP.Connector.dll. This is the core of the connector when then proxies calls through the RFC protocol to SAP. I didn't see the SAP.Connector.dll mentioned in Ted's diagram so I thought I would mention it here. If you install the connector through the install program it doesn't show up because it's tossed in the GAC in your development environment but for deployment to a WSS server (where you don't want to install anything except WSS, trust me) you might miss it.

    Also (our environment again) we needed to update the SERVICES file (found in %WINDIR%\system32\drivers\etc directory). This file contains alias' to the SAP system with the protocol to us. While you do set the name of the server you're connecting to in the Server Explorer and it can resolve via DNS no problem, internally the connector will use the SAP alias (or whatever the heck they call it) to make the actual RPC call. So if you get some odd error like "cannot find server sapdp00" in your exception, this might be the cause. Again, our environment so YMMV.

    Doing it this way, I was able to include the SAP setup as part of our build so the other developers didn't need to install the connector or anything. They just copied three DLL files to the server and updated the SERVICES file (the LIBRFC32.DLL couldn't be deployed to the bin directory like the connector DLLs could so we had to copy it to %WINDIR%\system32 for everything to work). Oh yeah, one more thing. If your IT people in SAP land update the BAPI calls (in any way, even just recompiling them) then you'll need to regen your proxy classes. I separated them out in our solution and put them into an isolated service layer so we didn't have to deploy our entire solution when SAP changed. Hope that helps.

  • SharePoint (mis)Information, again...

    Much like the ballyhoo that started when Mr. Drips posted the 5 things wrong with SharePoint, a company called Ferris Research isn't quite doing their research. They've released a post called SharePoint is not good for enteprise content management and since I'm in a mood tonight and it's my blog I'll get up on my soapbox and rant if I want to.

    Despite having a title that just sets off bells in my simple brain, I have to first off say that SharePoint isn't content management anyways. Never was sold that way. That's what Content Management Server (CMS) is for. Okay, the next version of SharePoint will elevate to some kind of Enterprise level as it collides with CMS and provides some very cool content management features. All of this will come in due time of course, but to say that SharePoint isn't ready for Enteprise CM today is like saying it's not ready for high performance workflow transactions either (and can't run your latest XBox game for that matter).

    The article goes on with a few points that are kind of like an alien autopsy where the patient is all blurry and unrecognizable and it's hard to tell if it really is an alien or not. You know, the show where they got Commander Riker to narrate it thinking that this would provide some level of credibility to an already cruddy video that looks like it was shot in the Star Wars Kids basement. Oh right, the article.

    "Limited Database Scalability. The default database for SharePoint Services is the Microsoft Data Engine. Its storage capacity is limited to 4GB for all content managed on a given server instance. Go beyond this and you need SQL Server, which gets expensive."

    Sigh. Yes, we all know the 4GB limitation on the database and it's pretty clear to most humans (at least those that take a minute to read the Administrators Guide) that you wouldn't use MSDE (or WSMDE which is what ships built-in with WSS) for anything other than development or a small team site. And SQL Server being expensive? I don't know about you, but the standard edition is about $800 USD (prices vary) which isn't that bad if you want to service a few thousand users (which you could on a single decent box, as in a $2000 desktop running it, I know, I've done it). If you have a company of 50 employees and you're not using SharePoint to store the universe, then 4GB is enough but I can't say I've ever seen a company that wouldn't lay out a couple of thousand dollars for hardware and software to serve up databases for the all it's employees applications. I don't see that as limited, but that might just be me. Yes, SQL Server can be expensive if you're talking about a multi-cluster box with hot swappable failover but then what isn't?

    "Weak Searching and Navigation. It's difficult to find information spread across different workspaces."

    Hmm. Search my name in Portal Server at the last company I was at and all documents and list items I authored or was mentioned in come up. If you're only talking about running Windows SharePoint Services, then yes, the cross site search is weak. Why is it weak? Because it isn't there. It's not a designed feature (although there are add-ons that you can get to do it). Okay, Portal Server isn't Google when it comes to searching (yet) but when a company the size of Microsoft shifts all of it's internal search projects to use SharePoint as the search engine, that says something. Again, I wouldn't call it weak but it depends on how you're looking at it.

    "Lack of Security for Regulatory Compliance. There's no built-in means to apply security or manage the document lifecycle at the individual document level."

    Agreed but again, it wasn't made for that. If SharePoint was pitched as "Your Enterprise needs for Regulatory Compliance in a box" and didn't deliver then you have every right to bitch and complain that it isn't there but stop asking a pig to fly. This all changes with vNext so stay tuned. I know that doesn't help today but there are products on the market (free as in beer) like the 80-20 compliance server and the SOX accelerator that make up for this.

    "Software Licenses Costly. Windows SharePoint Services is usually free. However, organizations will most likely have to buy SharePoint Portal Server and SQL Server and, potentially, third-party records management software. Based on retail pricing, a typical SharePoint-based ECM environment will cost $270 to $320 per user to acquire."

    Not sure what's meant by "Windows SharePoint Services is usually free". It's always free. Here's the download if you don't believe me. Yes, you need a Windows 2003 Server (and licenese and CALs to run it) but the software is free. As for Portal Server, I don't recommend people go out and buy it if they don't need it. For some reason, the community at large immediately thinks they need Portal Server and, more often than not, they don't. WSS usually is more than enough if you're doing something like departmental team sites or project sites. Also I don't know of any company that pays retail for Microsoft software. Either you have a Volume License agreement or something else where you pay an agreed amount. I don't of any company that pays retail unless you're two people and a small dog. The last company I was at had 7000 seats so licensing was pretty minimal as far as cost went (a users desktop which included Windows XP and CALs for servers [including SharePoint] ran about $50/user. When you get up in those numbers, cost is a bit of a wash compared to other software (take a look at Oracle's price gouging for example). Costly? Sure, if you're dumb enough to fire up a SQL cluster and a Portal Server for 10 people.

    A lot of this just boils down to getting what you need and being smart about it. Too many times I hear the same kind of thing about SharePoint (or any other MS product) and how it fails at this and fails at that and is costly blah, blah, blah. When you have about a hundred employees, a couple thousand dollars isn't much for say a Windows Server, SQL, and a WSS site. With a couple of hundred users, Small Business Server is a good option and priced well (and based on WSS for it's document and collaboration features). With a few thousand users, another SQL Server and even Portal Server isn't that costly IMHO. And yes, I've lived and breathed these situations so I'm not just blowing wind out my butt (although I'm sure people will say otherwise in response to this post).

    One more thing about cost, I just checked the Ferris page and they now have an entry on Oracle's Content Services and how's it's ECM ready. Of course it's by the same author as the SharePoint one, David Via. Wonder if he'll go on how amazingly cheap economical the Oracle solution is (not!). Of course when you factor in the Oracle database licenses (SQL Server), then there's the Oracle Portal product (SharePoint Portal Server), the BEPL process manager (BizTalk), the Oracle Collaboration Suite (WSS), and the other add-ons you need to get the full potential of it. Well, come back to me and we'll do cost comparison for the full stack and see who comes out on top.

    So I don't know who get's paid at Ferris Research for their research, but I think they need to look at some research basics before diving into my territory again.

  • Get the scoop on the Office 12 UI now

    While we as mere mortals can't show you Office 12 screenshots or talk about functionality, if you're looking for the goods on Office 12 and the UI in particular I highly recommend you to check out Jensen Harris and his UI blog. He's the program manager for Office (or some part of it, I can never get the pecking order straight with softies) and an all-around nice guy. His presentations at the MVP Summit were great and he's been blogging quite regularily on the new UI features (as well as a great series of blogs on how the UI grew up to what it's becoming). So check out his blog here.

  • Updated WSS Admin Guide

    The WSS Administrators guide has been updated for SP2 and includes the following new topics:

    • What's New in Windows SharePoint Services Service Pack 2
    • Allowing Web Applications to Coexist with Windows SharePoint Services
    • Preparing Front-End Web Servers for Windows SharePoint Services

    Some updated topics include:

    • Backing Up and Restoring Web Sites
    • Changing the Application Pool Identity for a Virtual Server
    • Configuring Two Virtual Servers to Host the Same Content
    • Extending Virtual Servers
    • Hardware and Software Requirements
    • Migrating from WMSDE to SQL Server
    • Remote SQL Server Deployment
    • Security Considerations for Server and Site Configurations
    • Separate Active Directory Directory Service Organization Unit Deployment
    • Windows SharePoint Services Security Model

    A few of these topics have come up in the newgroups recently so it's all there. Grab your copy now while they're fresh!

  • Scott clearly explains BizTalk vs. WWF

    By now you've probably heard of Windows Workflow Foundation (WWF, what a 'nuther great Microsquishy acronym) which is the workflow engine to be embedded in the next version of SharePoint and the Office servers (which also means it'll be in Navision, CRM, Project Server, Team Server, SBS, SPS, and everything else that uses WSS under the covers). Follow me so far?

    Anyways, I keep hearing from people a lot of confusion over BizTalk vs. WWF so I thought I would point you to Scott Woodgates blog on the subject as it clearly spells it out the best explaination about this (in case you need to explain it those that are still trying to get it).

    In a nutshell:

    • Workflow within applications = Windows Workflow Foundation
    • Workflow across applications = BizTalk Server

    Nice. Check out his entire blog entry here on the subject if you need more detail. Not directly SharePoint related, but just in case you need a quick elevator speech on the subject. Enjoy (and thanks to Scott for doing this as it much needed in many communities).

  • Welcome new MVPs!

    A new rounds of MVP awards is up and there's a lot of new ones and some old ones that have returned (like Angus even though we try to get rid of him, we love the little Aussie). Congrats to everyone who made it into our crazy and bizzare club. The recent MVP Summit made some great press with Microsoft and it explains what an MVP is and why we're here (as I tried to do horribly did a few posts ago) so check it out here and here.

    Also shout outs to Heather Solomon, a long time SharePoint contributor, who joined the club this time round. Much deserved and we'll be seeing you under the table at the next Summit. Again, congrats to everyone. Here's to another great year of sharing and change!

    Update: Here's a list of all the new SharePointHeads in MVP land (with links that I could find for their respective sites/blogs):

  • Can't wait for V3 and the Recycle Bin?

    Chris Johnson has posted with what is probably the better mousetrap for recycle bin functionality in SharePoint. And you don't have to wait until V3 to get it. The guys in MS IT created yet another ISAPI filter that sits in front of the WSS one and intercepts any deletion requests and copies the to-be-deleted-file to a file share. Very slick. You can check out his post here and grab the source, scripts, etc. from the GotDotNet workspace setup for this tool here.

    One thing to mention is that the filter will copy files to a file share so you could restore from that. My suggestion for anyone who has too much time on their hands (like us MVPs according to some people) is to have it post the file into another document library. That way you could have end users restore their own documents. With a simple event handler on that library (or a nightly task that runs a small command line app) you could purge the recycle bin library of any documents older than a set date (say 30 days). A little more work, but with a few changes you could get very close to a duplication of V3 and it's recycle bin capabilities (even going so far as to create two libraries, one for end users to restore from and one for admins to). Doesn't take up as much space as the "copy everything" concept and could be quite managable.

    P.S. I should have known, but the response for getting in on the beta for my SharePoint Builder tool (what a lame name huh?) was overwhelming (120 requests so far!) so the beta is closed now. Thanks to everyone who's out there to help. You'll be hearing from my email soon.

  • SharePoint Builder

    We were talking at the MVP Summit and I mentioned there are two pet projects I want to get done by the end of this year. Today I'm revealing the first one which is a graphical editor for SharePoint Xml files (ONET.XML and SCHEMA.XML in particular). This is similar to something like NantPad which does the same thing for NAnt files. I got pretty fed up with editing the Xml files by hand (and even using something like XmlSpy is a pain, not to mention costly) and didn't see that changing for V3 (the Xml files have been reduced and are nicer to work with, but they're still there). So I wanted something better.

    Features of the tool:

    • Client based editing so you can work offline
    • Publish to server and reset from inside the tool to see results immediately
    • Graphical editing of all nodes in ONET and SCHEMA
    • Validation of nodes so your output isn't screwed up
    • Context Menus so you can just add stuff without having to know all the Xml behind it
    • Ability to read in ONET and SCHEMA files from existing SharePoint sites for editing
    • Visible output of Xml as you build it
    • Ready for V3 as it understands both 2003 and v3 versions
    • Great Taste! Less Filling!

    Email me if you want in on the beta (oh god, there goes my spam count). Looking for people to not only kick the tires but help shape the features and usability of it. Cheers!

  • Reflections of an MVP

    The last four weeks has been interesting for me. Besides living out of suitcases, I've met dozens of interesting individuals at PDC and even more talented and diverse people at the MVP summit. All unique in their own right and with their varied perspectives, opinions, and thoughts on technology, architecture, and software design. With the general community at large, more often than not, most people don't know what this whole MVP thing is all about. Sure, there are a few paragraphs and the elevator speech dotted around on various websites but what do Most Valuable Professionals mean to you and why should you care? I mean, what's it all about?

    Call us commnity leaders, technical champions, or simply ubergeeks. We, like yourself, have a strong passion for technology and a deep desire to share our knowledge with you. We get excited when we see a problem as we look at it as a challenge to solve. We are the builders, the dreamers, the listeners of change. Like the Microsoft campus itself, the technical community at a vast sea of knowledge and full of diversity. Like each building on the campus, the community itself is unique with each of its problems, ideas, and solutions. This is the very fabric that makes this multiverse an interesting place to work and breathe within. The attributes that make us stand apart in this world are those that eventually bring us all together.

    In an effort to build on what Microsoft strives for (and to resonate with what Steve Ballmer said) we are people in the community and here, both as individuals and members are representatives and communicators of this balance between innovation and customer collaboration. We're not magicians and we're not soothsayers but we do position ourselves as a bridge between you and Microsoft. Most of us are employees or consultants who have to work with Microsoft technology each and every day. We have to live in the same world that you do so there is no Us vs. Them here. We're just human but that passion we share around technology is something we have in common and we want to strive towards making a better world where things just work.

    It is this self-sustaining action itself that feeds and grows so not only do we, the MVPs, need these retreats with the Microsofties, but also to be messengers of your experiences and concerns. We emphasize with your pain when a technology doesn't work as advertised because we've gone through it too. We want to help drive the cahnges necessary to see the things we hold true and watch them evolve and grow over time. Without you and without Microsoft we cannot instigate this change. The three of us form a techno-eco-system, each depending on each other and feeding each other through experience to change. One voice yelling is strong but a whole chorus is much better so we are here to help form that chorus.

    The information absorbed this past week during the summit isn't just another stack of white papers to add to. It is a powerful ball of knowledge that we are here to share with, grow around, and explore together which will come out in time as Microsoft reveals the bits and pieces of the pie. The Office 12 and vNext version of SharePoint release is almost a year off now and there is going to be thousands of blogs, screenshots, videos, articles, and books as the next evolution in collaboration forms. So leverage us. Remember us. Use us. We go off on our tangents and rants but in the end we're here to provide an outlet for you to share and for us to grow with it. Its going to be a long ride and I'm sure there will be bumps (there always are) but looking to the road ahead, it's going to be a great trip.

    The best is yet to come.

  • MVP Summit - Day 4 (The Big Goodbye)

    So that's it for another year and the Microsoft MVP Global Summit comes to a close. It was an excellent week, even if it was an exhaustive schedule. Getting to meet everyone face to face was nothing short of fabulous. It's sort of like a U.N. Meeting, but for geeks. I don't know how many times I laughed at silly jokes that nobody would get if they didn't boot up a laptop everyday or deal with an IT problem. There was a lot to take in so we'll be digesting this information for sometime now. I can imagine there are literally thousands of OneNote pages with scribbles on them from the weeks adventures which will eventually make their way into someones blogs someday. Even Gary Bushey was completely alert and awake as evidence from the picture below (with Brad explaining the synopsis of Serenity to us).

    I have to tip my hat (okay, so I don't wear a hat but hey it's just an expression) to Microsoft for putting on the event for us. These kind of things are a monster of co-ordination and you could always find a 'softie standing around to help you or give you some directions or drop another t-shirt in your bag (okay, so there were some serious transportation issues but we'll ignore that for now). Also a tip of my hat (remember it's just an expression, no hat here) to the other MVPs who got to travel from all over. Some people had to travel for 20+ hours on planes (or some from Kirkland which is 5 miles away) but it was well worth it having everyone together. I'm sure each of the MVP groups are a little closer now after meeting up with each other and exchanging tales (at least I think this is true for the SharePoint ones but I can't speak for others).

    I want to say goodbye and thanks to everyone I met up with if I didn't get a chance to do it in person. Also shout outs to the various MVPs I came across (in no particular order except what my brain can recall):

    And of course our MVP lead April Dalke and the every popular propeller-head Fitz (my apologies for those I missed as I'm sure I missed a few). Live long and prosper (okay that was completely geek-ridden but cut me some slack as it's been a rough week). Here's to seeing you guys again soon.

    I spent the afternoon of my last day in Seattle downtown taking some pics of the town and what it has to offer. It's a pretty city with a lot of interesting architecture and sites to see. As with many cities that you don't live in, there are odd type behaviours that stand out. The farmers market is one such thing in Seattle as they toss fresh fish (mmm... fresh fish) around and put on a show for the various hangers on. In any case, check out my pics on Flickr for some neat things I ran across. It seems each city offers something different and unique for visitors (even if the natives look at you like an idiot as you take pictures of things they see everyday).

    As with everything, it's tough to say goodbye but, as they say, we'll always have Redmond.

    MVP Group Photo Pool (Join up today!)
    My MVP Summit Flickr Set

    P.S. Office 12 has native PDF support in case you didn't catch that elsewhere.

  • MVP Summit - Day 3 (Sleepless in Seattle)

    It's Saturday morning as I enter this but the last few days have been an incredibly exhausting time. Our schedule on the campus starts around 5:30 when you get up, usually entails a half hour bus ride from the hotels and then various sessions. Yesterday was the most exhaustive of the schedule as our brains were saturated with presentation upon presentation. Again, a lot of stuff I've seen at PDC but the experience of having the product teams here and interacting with them makes drinking the Kool-Aid much more paletable.

    The day was full of cool sessions and has got a lot of us thinking about what we'll be doing for the next year as we help you guys get up to speed on the new products, ease your migrations and pain points if you going from the current version to the new one, and generally look at doing what we do with our technology areas; push the envelope of what is possible. There's been a lot of inspiration this week, a lot of in-depth conversations with people, and a lot of new horizons to discover as we continue to integrate, innovate, and communicate our experiences and yours with the SharePoint technology stack and look at ways to really drive the creation of business solutions on the platform to the n-th degree.

    After what seemed like a whirlwind day of sessions yesterday, we wound down with a trip to the Experience Music Project (EMP) and the Sci-Fi Museum (SFM) at the Space Needle last night. It was a pretty packed event but lots of interesting stuff to see. If you have a chance to check it out when you're in Seattle, give it a try. So it's off to breakfast now with the final sessions wrapping up today, saying goodbye to everyone and a BBQ to end the week. Here's to hoping the weather is good for us today.

    MVP Group Photo Pool (Join up today!)
    My MVP Summit Flickr Set

  • MVP Summit - Day 2 (MVPs, MVPs, MVPs)

    First off, my apologies for those that were tortured in their news aggregators with yesterdays blog entry. It was a long day and I did 4 or 5 separate postings in Notepad throughout the day then a single blog post which was probably the longest one I've done so far.

    Today was the first "real" day at the summit as we had some great keynotes (including one from Steve Ballmer, boy does he just have a killer stage presence) and then some general sessions (some new, some stuff I've seen at PDC). Again, a lot of networking and talking and meeting with new people. There's just so many of us here and so many Microsoft people to talk to as well.

    As I mentioned, I'll keep these posts shorter as I'm sure you don't want to spend more than a few minutes reading my blabber. The fact that I can't post details about what's going on here will keep the posts short and like I said before, will be more about how many beers per MVP are being consumed and what blackmail pictures we can post on Microsoft employees.

    I've created a Flickr Group Photo Pool here. If you have MVP pictures please add them to your Flickr site and join the MVP group! It's open for anyone to join so just join up and add your pics (as I'm sure everyone is getting tired of my SharePoint people pics). C'mon MVPs, let's see pics from the other groups. Also you should tag your pictures with "mvp05" which will allow anyone to find the pictures from the Summit quickly and easily. Please pass this information to other MVPs that you see taking pictures! (and yes, Channel 9 guy is back for the Summit!)

    MVP Group Photo Pool
    My MVP Summit Flickr Set

    Speaking of Notepad, we don't have an MVP for Notepad. I think this is a serious gap in the entire MVP substructure and something needs to be done about it immediately.

  • MVP Summit - Day 1 (Here we go again)

    I'm at the airport waiting for flight AC205 to Vancouver then another hop down to Seattle for the Summit. I have to hand it to Air Canada for the check-in process. It's a slick set of machines that you walk up to, insert a credit card and get your boarding pass and whatnot printed out for you. Took all of about 10 minutes to get through it and checked my bag in then I was off. Sometimes you can upgrade your seat or whatever, which I was hoping to do, but guess the flight is filled up. In any case, it's a great way to check in and gives me that little shot of nerdrenaline in the morning that we geeks need.

    Getting through customs was easy, as usual. Hey guys, this is Calgary and while we do call it an "International" airport, expect to show up about an hour (tops) before your flight at any time during the day. I'm planning on doing a lot of traveling this year as I now have clients down in the States to nuture and pamper so the Aeroplan guy convinced me that $120 a year is a good thing to for their plan. Seems like a good deal and it was after I had my morning coffee at Timmy's so why not.

    I was waiting at the terminal and looking at the no smoking sign everywhere but there were a ton of places to buy tobacco at the shops. This doesn't make a heck of a lot of sense to me but okay, I'll go with it (there are some places in the food area sectioned off like a glass house where you can toke up). A guy who was obviously going to head into smoke land asked me if I had a lighter. What the hell? Why do smokers never have lighters? You're a smoker, isn't that the main tool for your habit? You need two things as a smoker, a cigarette and a way to product flame. You ever see anyone with asthma borrow an inhaler? I don't think so. Some peoples kids.

    I'm staying at the Crowne Plaza (Room 2055). I'm planning on hooking up with Al Dunbar at Seattle to share a ride with him and his daughter. Also picked up the required items for the flight, a tin of Tim Horton coffee for our ex-Canadian MVP Lead and a keychain Calgary for someone who's collecting them at the Summit (sorry, can't remember who so hopefully we'll hook up before the weekend). As odd as it may sound, I collect sand from various places in the world (my secret plan to build my own beach) so hopefully there are a few people at the summit that are going to be bringing me a sample. The security I hear at the Summit is pretty tight if you're not an MVP and with all the NDA stuff going on, as I said, this may just be a series of horrible blogs on Bil's Adventure in Microsoft Land with pictures of drunk MVPs and homeless Seatle people (or drunk Seattle people and homeless MVPs, whichever works for you). Feel free to change the channel to something more interesting.

    The weather looks great for take-off here in Cowtown but I don't have any WiFi access at the airport so can't check to see what's going on in Seattle. I really think it would be great if they just provided free WiFi at all airports and not for certain customers (Telus Mobily customers get it free, but I'm on another plan). Really is it that hard to make us geeks happy when we're stuck sitting around for a couple of hours? It's not like we're going to be downloading the latest Brad Pitt movie on our laptops at the airport are we? Oh well. Someday. I did however buy a new Brookstone umbrella (complete with light up handle for the nerd factor) coming back from PDC just in case it's wet down there.

    They just paged Mr. Douglas MacArthur to the desk. Can't wait to see old iron guts show up. I thought he was dead but guess the heroes don't die, they just wander aimlessly through the Calgary airport looking for their luggage. I'm off to find Elvis and Jim to see if they want to jam.

    Takeoff was good. I missed a great photo-op with the downtown core being lit by the morning sun and the Rocky Mountains in the background while water flowed off the window. Oh well. The Rocky Mountains look awesome, as always, and even more so at 10,000 feet as the snow covers the tops now. It never ceases to amaze me how stupid people are when they get onto a plane. I mean, how freakin' hard is it to find your seat? The seats are clearly labeled (at least IMHO) with the row and what letter is the window seat. Watching everyone board no less than 3 groups were in the wrong seat with 1 not even near the right row (they were 3 rows off and on the wrong side). Is it that much to ask for people to learn their ABCs and 123s by now? The flight is pretty thin and I lucked out to have an empty seat next to me so nobody bumping my elbow as I update the blog.

    I can't see anyone else on the flight I know but I'm sure there were some coming from T.O., Edmonton, and Calgary on here. Maybe I could scream "MVP Rocks!" at the top of my lungs and see if anyone looks. I could always chalk it up to Tourettes if the air people ask. Well, I have my dorky MVP badge around my neck so that's about as dorky as I can get for someone to spot me. The upside is that if I get lost (say in a bar or something) you can just drop me in a mailbox and hopefully they'll return me to the SharePoint group in Redmond (wouldn't that be a neat package to get at the office eh Fitz?).

    I do find that I'm just going to have to change to business class (and why is it called business class now instead of first class? to ease the blow to those in the "hospitality class" so they don't think they're second class. That's just plain dumb). At least in first business class, my extra deep laptop won't dig into my gut as I type. It's great that they have a nice wrist area for the new laptops, but now you need an extra deep seat (which you definately do not get in second hospitality class) just to open the damn thing.

    So I rolled into Vancouver airport without incident and met up with Eric from Winnipeg and Al Dunbar from Edmonton (whom I setup a ride to the hotel with). The flight was short from Vancouver to Seattle on board a tiny prop plane which isn't much bigger than a SUV (but probably uses up a little more fuel). Didn't we invent some technology called the jet engine back in the 50s or something? We hit Seattle and checked into the hotel. The hotel I'm staying at (The Crowne Plaza) is quite nice (trust me, anything where the shower head is at eye level is bonus in my books) with the room being nice and roomy. You can reach me in room 2055 if you're looking for me. Feel free to drop by sometime. It was interesting to find a package with ear plugs, a face mask, and a hypno-CD that I can play on my Sony "Dream Machine". Guess they figure we're going to be so burnt out from the day we need it to relax (either that or the CD is actually subliminal messages telling us to buy more Microsoft product). It was also interesting to find movies that are still in the theatre (like War of the Worlds) available for $13 on my TV set. In any case, check out the pics in my Flickr site for more goodness. 

    The summit, well, is fantastic. It's going to be bloody exhaustive the next few days so expect more long dribbly blogs from me at the end of the night. I grabbed a short bus ride (30 minutes) from the hotel to the Microsoft Campus. Oh boy is the campus impressive. It's a proverbial city unto itself, with buildings all over each unique in architectureal design. Very, very slick. After registration I had planned to hit the Employee store and stock up on my Linux posters, but networking took it's toll and I hooked up with some great people that I've been reading their blogs for months now. It's truely awesome to put words to faces and great to meet people like Michael Greth from Germany in person (watch for a MVP Summit podcast from him soon). Like PDC, this event is huge with over 1500 MVPs in attendance and 1200 Microsquishy employees catering to our every need. Pure magic.

    So it's off to a dinner and drinking and whatever gutter I end up in tonight. At least this trip I still have the same camera I started with. Catch you guys tommorow.

    Flickr MVP Photos

  • Windows SharePoint Services Service Pack 2 Released

    It's here! It's here! Just wanted to let you know that WSS SP 2 is now available on the Microsoft Download Center. You can find the direct download link here.

    The WSS SP 2 release has substantial supportability improvements including:

    • Support for running on 64-bit machines in 32-bit emulation mode 
    • Support for Reverse Proxy and Alternate URL support
    • Support for IP Bound virtual servers
    • Support for off-box SSL termination
    • Support for SQL Server 2005
    • Support for ASP.NET 2.0

    Everyong running WSS and SPS are encouraged to update to WSS SP 2.  However, although SPS SP1/RTM will be able to run on top of WSS SP2, Microsoft is restricting support for the "shared" functionality that is added in SP2 for SPS and WSS until SPS SP2 ships. The shared functionality is the support improvements above.

    In other words, even though you'll be able to install WSS SP2 on SPS SP1/RTM installs, you still need to wait for SPS SP2 before utilizing any of the newly-supported functionality above.

    Some useful KB articles related to this release:

    The Windows SharePoint Services Administration Guide will be updated later in the day today. Make sure to download the latest copy so that you have instructions for using the new WSS SP 2 feature functionality.

    Windows SharePoint Services SP 2 will also ship in Windows Server R2.  Additional documentation about the new SP 2 features is included in this walkthrough document.

    Thanks to Gabe Bratton for this information and Microsoft for this very cool release. Get yours today before they're all gone. Operators are standing by!

    Update (14:26 MST): Added links to the KB articles with a description of the Service Pack and what issues it fixes. These are now online for your consumption. Enjoy!

    Update (23:18 MST): Microsoft is also (officially) supporting FireFox 1.0.4 (and later) with this SP2 for WSS. Sweet!

  • Advanced Extranet Support Documentation Update

    A couple of quickies tonight.

    In preparation for the upcoming Service Pack 2 for WSS (which provides ASP.NET 2.0 support to enable WSS to run on ASP.NET 2.0. but we do
    not get to use native ASP.NET 2.0 web parts until WSS v3), the online SharePoint Products and Technologies SDK documentation has been updated already to include information about reverse proxy support and the WSS object model. You can check out the updated documentation here (Note that the Service Pack hasn't been released yet but stay tuned for that).

    Just a note with the next few days I'm away at the MVP Summit, I'm delaying my WSS V3 Deep Dive series to start next Monday, October 3 when I get back (also gives me more time to prep and get as much in as I can).

  • PDC fallout

    I've finally got caught up on everything that happened at PDC (as well getting my system back online at home). I'm starting a series of SharePoint V3 Deep Dives next week focusing on various new features so stay tuned for that. The week will be cut short as I'm off to Redmond on Wednesday for the MVP Summit and I think all of it will be NDA so no blogging (but I'll post pics on my Flickr site of other MVPs getting drunk which should be good for blackmail sometime in the future).

    Stramit (among others) has a great blog posting with links to all the non-NDA PowerPoint presentations on Office 12 and SharePoint V3. Check it out. There's also a whack of other slide decks here as well for the rest of the conference covering Vista, Windows Workflow, and other next year goodness.

    Finally I just got an email today about Amazon and Microsoft hosting a Developer Challenge. It's dated September 12 and was supposed to be done at the launch of PDC but for whatever reason it dropped in my inbox this morning (you probably already know about so ignore this passage if that's the case). First place is $5,000 of Amazon bucks and there are some pretty good runner up prizes (like an X-Box 360 which is always good). Basically build an interesting application using the Amazon Web Services. The contest runs through until December 31 so there's plenty of time to check out the details here and get building!

  • It's good to be home

    Back in Calgary after a week in sunny L.A. It's good to be home but took me awhile to get going. When I returned one of my development PCs had decided to do some Windows updating while I was gone (how nice of it) and ended up getting screwed up on reboot as it looked for hal.dll (I'm sure some of you have seen that before). Had to fiddle with some drives but got it back now.

    Kit Kai, a fellow MVP, has posted a series of great articles on allowing a team to edit a document together. It's broken down into 4 articles and you can check out the series here:

    Finally there's a global MVP summit coming up at the end of the month. A week from now I'll be down in Redmond hanging with the SharePoint dudes and having a grand time with other MVPs. It's quite an event as MVPs from all around the world get together and have a good time. Unfortunately for some, their governments (for whatever reasons) have denied issuing visas to them. The MVPs from Sri Lanka won't be attending the summit which is too bad as global should mean global and not "everyone except these countries..." So Jinath, Manzi, and Prasanna won't be joining us in Washington next week. We'll remember to raise a glass to you and get you some cool schwag.

  • PDC Day 04 (Goodbye, Vista Brick Road)

    That's it for this years Professional Developers Conference. It's done like dinner. As I'm writing they just announced that there was a single winning ticket for the L.A. lottery here, which was at $250 million. Yup, that's a quarter billion dollars which is about what it probably cost for this years PDC. A slow day for walking (9,030 steps, 6.84 miles) and pretty quiet as things wound down. The Channel 9 guys were giving away the bean bag chairs so a few people were on the bus with their own Channel 9 guy they can use in their cubicle (can you imagine explaining that to airline security or even buying an extra ticket for your chair?). 

    No SharePoint sessions today. Sad huh? I finally managed to hook up with Kate Gregory this morning during breakfast. When you come to these things there's sessions you want to attend (or have to give), booths to see, etc. but you end up always hooking up with people and getting distracted (the butterfly effect). This is what's been happening all week with me and others mention it as well. It's good that I met a few people (even stumbling across Medhat, a MCS guy from Calgary that I've known for years) on the last day as it might be awhile before I see them again, even though we're always travelling around and such. Kate of course was heading off to the C++ talks which I heard was pretty interesting.

    I sat in on the future of Agile panel discussion. It was a good talk but didn't seem to talk much about the "future" of Agile but rather the current state of Agile and what Agile meant to everyone. On the panel were (pictured below, left to right) Don Reinertsen, Peter Provost, Jim Newkirk (father of NUnit), Don Reifer, and Clemens Szyperski, with Randy Miller moderating the fishbowl session.

    What is Agile? The panel generally agreed that was "emphasis on feedforward rather than feedback" with emphasis on keeping the feedback loop short and most stated it as a "series of practices to add value to clients" which sums it up nicely. Jim Newkirk had a biased towards "the smallest amount of process needed to get the job done" with a high bandwidth within the team (which is key to any Agile practice). Peter Provost was happy to say that Agile was about the "right thing at the right time for his customers" and to do the right thing at the last "responsible" moment.

    Don Reinertsen had a great analogy for Agile. He said it was like standing in the fog on a road. Waterfall is where you put a plan together to get to the end of the fog (where that is) whereas Agile tends to have you walk 50 yards, make adjustments, continue, etc. until you complete the journey. This "plan as I walk" approach is great and will give you that immediate feedback that you're on the right track (or allow you to correct it if you're heading down the wrong way).

    Randy stepped up during a question and talked about the "total team" where everyone is communicating and collaborating, not just the devs. Get your testers, analysts, and architects all involved as it's important how they interact. The concept of "exploratory testing" came up (which is a term I hadn't heard of before, but then contrary to popular belief I don't know everything [except when it comes to SharePoint]) but the whole panel was quite happy about seeing this emerging and suggested taking a look at it to involve everyone.

    All in all a good session (but I did have to duck out early) but check out the blogs linked above for more information. There are also a great set of links all over the place for Agile but you can start here (which is one of the many jumping points to other places).

    So I'm here in L.A. for another day taking in the tourist stuff tommorow and snapping pics of the Los Angeles wildlife. A few things that I've learned from this trip:

    • Take the business class flight if it's over a couple of hours, your butt will appreciate the extra space
    • Don't check into a hotel with a shower designed for munchins.
    • Don't answer your cell at 11pm at night from a complete stranger who only knows you through your blog. More importantly, don't say "Yes" to going out on the town with them
    • The only quake I experienced in L.A. was in my head the morning after said phone call.
    • Don't take the Universal Studio tour at night. While the lines were short and beer was free, the only thing we got to see were chipmunks and it wasn't even Alvin and Theordore (and I think I just lost about half the readers of this blog with that comment, so that cuts down my audience to 4 instead of 8)
    • I genuinely feel that I have Electro's super powers as I was responsible for restoring power in our hotel after the blackout (well, at least it looks that way to me so just go with me on it)
    • Taking notes on my PDA sucks as it note only screws up when you switch away, but it's just a bloody mess trying to make heads or tails out of it hours later. Next time is a Tablet PC and OneNote.
    • Wireless was hit and miss. After the first day I couldn't get my laptop reconnected to wireless except back in Munchkin land so it was wired hookups. It's odd because I could almost always get WiFi'd with my PDA. Go figure.
    • Oh yeah, SharePoint v3 ROCKS!

    Again I want to say hi to everyone that I came across (it was cool seeing a few dozen people reading my blog while I was wandering through the computer areas). Also shouts out to those that I came across at the last minute like Julie Lerman, Kate Gregory, Todd Bleeker (wish we had more time to talk), Ted Pattison, Eli Robillard, Patrick, Jan, of course Fitz and the Professor and Mary Anne (and everyone else I missed).

    Next week I'm starting a series of V3 posts with focus on individual features so a bit of a more deeper dive into what's to come. Talking to Fitz before I left he'll be posting almost daily for the next few weeks with all the stuff that he can now say so keep an eye out there as well on other blogs in the SharePointSphere so you can see all the cool stuff coming to a virtual machine near you.

    Tags and Links

    Google Maps where I'm staying (Miyako)

  • PDC Day 03 (T-Shirt Frenzy)

    When there's no more room in Hell, the geeks will scrounge for free schwag. At least that was the scene today as the Channel 9 guys handed out PDC shirts to what seemed like everyone at the conference. The catch with these shirts is that they're all unique with spiffy geek phrases (mine said "No, I will not fix your computer... until after PDC05). Jeff, Scoble and the rest of the Channel 9 gang (including the big guy himself, no not that big guy but the foam one) were on hand tossing shirts around, taking video and pics, and generally having a great time. Hope you got yours.

    It's been a fairly lax day (18,120 steps, 13.72 miles) as I wandered about the SharePoint lounge, took in a couple of sessions on workflow, and generally just watched things like the exhibitors booths tear down. I met up with Julie Lerman today who was hosting a BOF session this evening about Going Solo. It was a great session with a good turnout from lots of people (Rob Howard even poked his head in) and a lot of great discussion around going solo, working for yourself, and generally making it in the real world (and sustaining whatever "it" is). I snapped some pics of the whiteboard where we captured some trains of thought and resources so check Julie's blog as she'll provide a summary with links (at least that's what we told her she had to do <evil grin>)

    Tommorow is the last day with a few more SharePoint sessions to go and goodbyes to say to everyone. I'm staying in L.A. through Saturday as I want to check out the facsinating architecture in and around town and generally do the touristy thing (any suggestions for places to go let me know). Will be blogging next week as I sift through a few thousand notes on SharePoint and what I can blog about vNext along with some stuff that I've had in the works for the vThis version. Night, night.

    Tags and Links

    Google Maps where I'm staying (Miyako)

  • PDC Day 03 (The Universal Aftermath)

    All I have to say is a jaw-dropping wow. Not only did Microsquishy rent out the entire Universal Studios lot for the evening for all attendees, they opened up most of the food places (Mel's Diner, Flintstone's Drive-In, Jurassic Cafe, etc.) and provided that gratis (along with beer and wine booths everywhere). I can't imagine how much that cost but I'm sure it's just a rounding error for Mr. Gates and co.

    It was a great night last night and I'm sure everyone has a fantastic time. This was my first time in L.A. (besides driving through the airport on the way to Mexico, but that's another blog) so actually seeing the sites and events is bonus. The park wasn't very crowed as it's designed for probably 50,000 people and PDC caps out around 7,000 so lots of room to move around, short (or no) wait times on all the attractions, etc. The only drawback was that it was dark so the studio tour wasn't too exciting as you couldn't see very much (or get very many good pics). I highly recommend taking the studio tour during the day as you'll probably see a lot of activity and actually get some cool pics of sets and whatnot. There were a few films and shows shooting (like Alias) but the most we saw were some extras standing around waving (unless that was Jennifer Garner in the white, in which case... call me).

    So a busy night of fun with lots of walking (26,922 steps, 20.28 miles!), eating, and drinking and no computers, Office, or SharePoint. Hey, even a geek has to take a break once in awhile. Even Wilson got into the fun so check out my Flickr pics for more. Now it's off to a short breakfast and a long day of walking and talking and posting long blog posts (that nobody seems to read but I'm just not a bullet point kinda guy).

    Tags and Links

    Google Maps where I'm staying (Miyako)

  • PDC Day 02 (Here comes the fire hose)

    It's about 15 minutes before the buses start to roll out to Universal Studios where probably everyone is going to be. Microsoft has rented out the entire park for the evening along with all the food places so it's going to be a movie smorgasborg tonight.

    Today was SharePoint day at PDC as Microsoft pulled back the covers (or opened the Kimono as Fitz puts it) and opened the fire hose to SharePoint V3. I found the time to sit in on two sessions on configuration and customization and the new additions to the object model, deployment changes, and other good stuff so this is going to be a long (and hopefully informative) post about that (actually took me about 1 1/2 hours to put together from all my crappy notes and memory). More descriptive and more my thoughts rather than bullet points that you've seen around so far. I'm sure my other fellow SharePointers will have more to follow and I hope it's useful to you.

    First there's some pretty nice stuff happening under the scenes with V3. There's a nice audit model built-in so things like the number of views of a document are tracked but you don't need to iterate through each document to find it. Makes for a nice simple Web Part that you can build to display based on views (think number of views on a Flickr photo and you get the idea).

    For the geeks in us that like to see what the kimono is made of, there's a schwack of great stuff happening in the Object Model. The big thing is the flip from SharePoint intercepting HTTP calls and passing them onto ASP.NET (or rendering ASPX pages with it's own custom parser) to doing a 180 where ASP.NET handles the call (no more ISAPI filter) and then proxies to SharePoint if it needs to. A much better Architecture that will not only expose all (yes, all) of ASP.NET 2.0's capabilties but also play much nicer with ASP.NET apps. The other big thing in the code space is the compatibility with ASP.NET's Web Part Framework and really leveraging the ASP.NET model.

    Generally ASP.NET 2.0 Web Parts will work in SharePoint V3 (you can "kind" of get this with ASP.NET 2.0 and WSS SP2, but check out SmartPart 1.1 and Son of SmartPart for a better setup). There are some small things that don't work and limitations. For example you can't use ASP.NET 2.0 Web Part Pages as-is in SharePoint, you have to use the SharePoint implementation. You also can't use ASCX controls natively like you can in an ASP.NET 2.0 page but again, turn to SmartPart for this. What you can do is write a small ASP.NET 2.0 wrapper for now, but Microsoft will be providing this later in the cycle. The thing to remember here (as a result of PDC) is that this is all for WSS only! Remember that and don't ask when SPS will have these things available to it as there are many other products and services in the Office 12 eco-system that will be coming in the next months leading to the betas and release next year.

    So in a nutshell, if you're building for tommorow today, do it with the ASP.NET Web Part model and make calls to SharePoint specific classes to retrieve information, update lists, etc. You can use the SharePoint Web Part base class if you need it and there may be times you want to (e.g. web part caching is only in the SharePoint classes) but use it liberally as the long term is a single Web Part model.

    As for forms, the form templates are now in XML and you can replace the base ones on a web basis or per list (as well as other options). Have you ever wanted to modify the New.aspx page for a list but just saw gobbly-gook in FrontPage? Now you can 100% customize the form using a simple XML file. Do some branding, do some rearranging of fields, introduce new fields and controls, whatever. You still need to use CAML for views so don't go throwing away those skills just yet, but that's okay for all the other goodies we're getting.

    More stuff. Master Pages. They're big time present in WSS and that, combined with some very cool Master Page Tokens will make it a breeze to totally customize the look and feel of your sites. This is much more than just themes or even custom CSS. Another thing (and I can't remember if this is 100% correct) is that the Master Pages are applied to all pages, not just default.aspx. So the current issue of branding a WSS site and having some pages not take form (except for colours) to your changes is gone. There's a Master Page Gallery (just another doclib) that holds the master page file and you can apply a master page across the web, a site or an entire farm (which is pretty much the same for more of the changes with V3).

    On the customization and deployment front, V3 will have less XML and less duplication. It's now easier to change things in the system via the Features and apply it. Again you can apply it to a web, site, web application (think Virtual Server) or an entire farm. Most of the extra stuff that you always had to copy and use (even though you couldn't touch it like base types) is now in what's called a Global Template. Your customization comes in the way of Features. This is very much like features that you get in an MSI where you can choose items to include or exclude. There's also hooks in the OM for handling features so you can do custom code whenever a feature in installed, activated, uninstalled, and deactivated (like extra SQL work, go off to a legacy system, email notifications, tracking, etc.). It's basically the Add/Remove Programs for SharePoint and as a developer, you can create dependancies on your Features so (for example) one feature depends on another before it can be used. This will help avoid putting end users into unsupported or weird configurations.

    Another great new feature is the timer job subsystem. This allows you to hook into a continuous running process on the SharePoint server. You specify what gets called and when, how often, etc. so things that are currently built as separate console apps or services can be just another assembly on your server that can be turned on and off (even from within a Web Part say to turn archiving on and off).

    More goodness, in a word, XSD. Yup, a fully qualified XSD file for all the configuration files so editing them inside of Visual Studio 2005 will do validation and intellisense on the tags including allowed values and other stuff to prevent you from shooting yourself in the head when editing config files. Okay, so we still have XML based config files but at least there's less of them and they're validated now.

    As for customization you can hook into any part of the UI which is similar to what we have today (like adding options to the Modify Shared Page menu) but this goes beyond that and lets you build you own toolbar items, menus, and even hooks into the new Welcome menu which allows you to sign in/out, change the current user, etc. All of these can be security filtered as well.

    For hard core coding, there's some new classes like SPGridView which is basically a DataGrid but has a bunch of SharePoint-like look and feel to it as well as features to handle sorting and filtering, ala SharePoint style. So if you have custom classes that do this for you now (like I do) you can throw that code away and just instantiate a SPGridView and Bob's your uncle. There's more goodies like the SPBoundColumn class that you add to a SPGridView and lets you bind to a SharePoint list or library column.

    Another much needed class is the SPDataQuery. This is a class that will do cross site queries with a little CAML (set as properties). Basically create an instance of it, set the properties (list type to search, scope, keywords to search) and fire it off to get back a result (or bind it directly to a SPGridView). Sweet.

    If you look around the SharePoint space, there are a lot of navigation components. SharePoint V3 has these now baked in including breadcrumb trail stuff and a new Navigation Node object that you can get and traverse tree views of the entire site. This also has security filtering so if you don't have access to a feature, it's not available to you. Yes, in V3 we finally get links filtered based on your security or role.

    Still another beautiful thing (that got some applause in the audience) is the SPDataSource which is a SharePoint class exposed as an IDataSource. Yup, just hook it up to anything you want now and treat a SharePoint list as any data source which will make SharePoint reporting a snap.

    There's a small SharePoint/CMS MVP group growing at PDC. Today I met with Jans Tielens and Patrick Tisseghem. Interesting how people are different in person. Jans is taller than I imagined, Patrick younger and Angus Logan... well, Angus is just plain Angus (complete with his Porn room at The Standard). Good times and I'm sure you'll see more interesting blogs from them on the sessions they attended and thoughts that they have about things (Angus has been doing a series of one-line blog posts everytime he hears something new, we'll talk to that boy).

    That about covers it and I do apologize if there's some errors or omissions I made here. Like I said up front, the fire hose has been turned on and trying to go through what I have access to and what was presented, I might be wrong here and there in details so my apologies for that. If you're unsure about something or want more details, just yell and I'll see what I can do. Off to be a movie geek now!

    P.S. My heart almost stopped today as I saw Fitz blogging. Again. That's twice in two days, a record for him. Now that the gag is lifted, he's got a LOT of catching up as do we all. Watch for more to come.

    Tags and Links

    Google Maps where I'm staying (Miyako)

  • PDC Day 02 (An early morning start)

    I just woke up after dozing off in my room. It's 2:30AM and HBO is just finishing up with The Terminal starring Tom Hanks. Some days I feel like Viktor Navorski. Wonder if I could fall asleep at PDC and live there for a week undetected? Maybe I'll try that tonight after the Universal Studios party.

    After watching the public unveiling of Office 12 there's been a lot of posts of screenshots and peoples opinions of the new UI and features (including a lot of bitching and griping from the Slashdot crowd which isn't surprising). One thing I really like is the paradigm shift from the traditional Windows menu to the tabbed toolbar idea. Sure, there are some applications that I've seen that have tabbed toolbars but to merge the toolbar and menuing system and replace it, that's slick. I mean, we've been with the File/Edit/Help menu design since Windows 3.0 (or even earlier) and it's part of the CUA/SAA (?) standards (my memory may be stale but I think it's CUA?). I for one really think this is a big change and something that is for the better. I love the menu system idea but then when you look at tabbed toolbars, well it just makes more sense. It still takes up the same real estate for the menu items and on applications with a toolbar (which ones don't have it these days) you still have the same toolbar area (okay, the Office 12 toolbars take up a little more horizontal space) so why not only have toolbars? It makes sense and seems like an improvement. As for user training and such, I don't see a big leap here as the tabs appear very much like the current Menu items and well, people are used to toolbars already. I for one welcome our Toolbar Tab overlord.

    The killer is of course the extensibility that was briefly demonstrated during the keynote where you can add your own tabs or inject controls onto existing tabars. I really hope by the launch that they'll adopt this consistently across all products as it still isn't completely there for IE7 and things yet but I'm sure it will be. Just a little thing but a nice improvement and something to look forward to. For those building on the Vista platform, you can take advantage of it through the improvements in the framework but today, keep it in mind when you're building Fat and Smart Client apps the next time you sit down to start a design. You might like the change and it would prepare your users for the leap forward into the next version of Office. Again, keep an eye out on Office 12 stuff especially around new SharePoint features which will be flooding the channels after the keynote today.

    If you're looking to see who's going to be "manning" the SharePoint/Office lounge check out Erika Ehril's post here with the names and times. Erika is responsible for the lounge and is also the Site Manager of the MSDN Office Developer Center (ODC) and runs a pretty tight ship (yes kids, a girl who knows code and stuff, odd huh?). Fitz isn't officially listed (guess he's higher up the food chain? or maybe lower) but he'll be there as will some of the MVPs that are down here at the conference (I don't have a definitive list of who is but feel free to chime in on MSN and let me know).

    Tags and Links

    Google Maps where I'm staying (Miyako)

  • PDC Day 01 (Holy walking Batman!)

    Today I capped out at 14,592 steps. That's 11.04 miles according to ped-o-metre. That's a crapload of walking and I spent a lot of time just messing about at the SharePoint lounge. I expect it to be bigger later this week. It was a great day and there's so much to keep on top of here.

    First off must be Bill Gates keynote speech. With a hillarious back to school video (Bill G and Napoleon Dynamite star) it was really great to see the progression from the beginning of Microsoft and the shift that seems to be happening every 10 years or so (has it be 30 years already, wow). Check out Barry Gervin's post for an excellent summary and if you can find the webcast online take the time. It's worth it.

    Some of the covers on Office 12 got pulled back with some demos at the keynote and there are lots of screenshots popping up all over the place. I have to check with some people to see if I can use Office 12 for posts now that it's been revealed as I would prefer to use that for some SharePoint screenshots so check back later on that. There's a lot of great stuff happening for SharePoint and Office 12 but it's just the surface. Stay tuned in the next day or so as everything comes out of the closet. You'll be in for a wicked ride. Trust me.

    I stumbled across Mike Fitzmaurice in the SharePoint lounge so that was good (we SharePoint guys just can't seem to get organized enough for a dinner or drink-fest, hopefully we'll be able to all get together by the end of the week). Fitz has been doing his mole-like behaviors but popped up with some nice stuff about SmartPart and with the release of SmartPart 1.1 and Son of SmartPart, well, just go and start building. Jans and Patrick do such great stuff. Watch for (hopefully) a lot of posts by Fitz as he's got a ton of new stuff to blog about (mostly as a result of the stuff coming via PDC).

    Finally, PDC is freakin' huge. I think there's something like 7000 attendees but they have 50+ buses running from 7am to 10pm between 6 different routes. That's just to shuttle people from hotel to convention centre. I'm sure someone will do a detailed blog post about all the resources that went into this PDC, but as Bill Gates said this is the biggest PDC ever and we're still not even halfway there yet.

    Tags and Links

    Google Maps where I'm staying (Miyako)

  • PDC Day 01 (Grooving my way to PDC)

    Well another half day, another 5000 steps (thanks to my Microsoft ped-o-metre), and about 20 new t-shirts later here's the afternoons blog. I've been wandering the floors and will be heading off to the Groove session shortly. Talked with Hugh Pyle, the Senior Product Manager for Groove. He'll be there talking about it (and I think there's a demo). Check it out in Room 406AB at 2:45. You can check out Hugh's new blog here.

    I stopped by the Ontolica booth. They're the ones that make the most excellent free SharePoint Explorer tool (that I'm sure you all have downloaded by now). They have their newest version of their commercial search add-on there and I got to see what was up with it. Their new feature is very goole-like (as if that's news with new products these days) and will display hits within documents. Nice. The demo we did was a search in a Word document which then got rendered via the HTML Viewer and the hits were colour code highlighted. I think the beta is available for download, but check their site here.

    That's it for now. I'm pretty wiped so far and it's only 2pm. Another few more hours, some dinner and copius amounts of drinking should finish off the day. I'll be spending a lot of time in the Office and SharePoint track lounge (but would spend more time here if they got an X-Box hooked up, hint, hint). Catcha later!

  • PDC Day 01 (Lost in Translation)

    Good morning! The night went well with no blackouts, earthquakes (where are the earthquakes!) and very little food as parts of this town seem to roll up at 9PM. I'm staying at the Miyako hotel, not an "official" PDC hotel but it was what Expedia suggested to me and looked pretty good so I went for it (note to self: 3 star hotels in L.A. do not mean what I think they do as far as the rest of the world is concerned). So it seems everything here is geared, well, for the more Oriental types whos average height is 4'5". I'm not a really tall guy at 5'11" but as you can from the photo below, the shower doesn't make for a good morning experience. Next visit I'll ask for the hotel run by Amazons (not the Jeff Bezos type).

    Well, at least Channel 9 guy can get a good start on the morning.

    I just wanted to mention Flickr just plain rocks! I mean there are some great tools out there (Skype, Google, etc.) but Flickr just plain rocks. I've been using it for awhile now but didn't get to upload a lot of pics until PDC. Then I figured I would see what the "pay" version was like and it's great. Get it. Really. It's only $25 bucks a year. Yes, a year! It's more than worth it.

    Anyways, Channel 9 guy and I are off (I've decided that he will now be my official guide while I'm here in California and handle all the press and photo ops that may come my way as he works on being my agent). Everyone needs a travel companion and at least he's foam and not imaginary. So we're off for breaky at PDC and hit the sessions, Bill G's keynote, and the SharePoint pit (I'm just teaching Channel 9 guy the SharePoint ropes so be kind to him when asking questions). Back later from the floor and more pics!

    Flickr (what is with that shower?)
    Google Maps where I'm staying (Miyako)

  • PDC Day 00 (yawn, it's been a long day)

    Pop quiz. Who would be the person at PDC to lose the most digital cameras? The second question is how quickly (and often) can someone lose a digital camera at PDC? The answer is me on both parts. Well, almost. I was at PDC this evening after getting my replacement camera that went MIA last night and, yes, after leaving from one of the BOF sessions guess what SharePoint knob left his camera behind. I made it all the way to the hotel before I realized what was missing from the picture and then stumbled back to the bus, tore down the hall ways to the room and luckily I did manage to get it back but boy was that close. From now on I'm attaching it to my neck so if you're looking for me, I'll be the uber-geek with a camera permanently attached to his big head.

    Tonight I stepped in for Michael Herman to host the BOF session about open source tools and SharePoint. I was there to attend the session but for whatever reason Michael was unable to make it so I figured I would step up and do wherever I could. Thanks to everyone who did show up and not leave (yes, my jokes can be painful especially if you haven't had enough to drink). The session was fun and while I was completely unprepared, we covered a variety of tools and talked about a few aspects of SharePoint development. Hope everyone had a good time.

    I mentioned I would provide as much as I could in this blog so here it is. Below is a list of links to some of the bigger resources out there for SharePoint including specific links to some (hopefully most) of the tools we talked about tonight. Let me know if  I missed anything or if you just want to say hi. I'll be on MSN most of the time ( and on the floor and hanging out in the SharePoint/Office 12 lounge.

    OpenCanal Community - A WSS site with resources for open source tools, webparts, etc.
    SmartPart - Grab the latest version (1.1)
    SyncToy - Sync file system folders with SharePoint web folders
    SharePoint Discovery Kit - Everything you need to really understand SharePoint with labs and screenshots
    Mark Kruger - Excellent list of tools, webparts, and more (also check out the left sidebar for more resources)
    GotDotNet Workspace for SharePoint - Big collection of tools and utilities, most with source
    SharePoint Resource Kit - Lots of handy tools and excerpts from this great book
    SharePoint Tools Galore - Another fabulous list of tools and goodies for SharePoint
    CAML Builder - Forgot to mention this during the session (doh!) but it's a must-have tool if you're pulling your hair out with CAML
    SharePoint Explorer - A must have tool for developers and admins. Free from Ontolica.
    SPSDev - Lot of great little utilities and web parts.
    CorasWorks - The grand daddy of rollups for those with a budget
    NinTex Smart Library - Workflow (and more) for your libraries
    AJAX.NET Library - More DHTML to load up your otherwise bloated SharePoint sites but cuts down on post-backs
    Bluedog Limited - Technical blog for SharePoint
    Code Segment Blog - Free rollup type web parts
    Reflector - Lutz Roeder's tool that every developer should have.

    There's always more to talk about with SharePoint. The discussion did come up and people are still maybe confused over the whole SPS vs. WSS thing so feel free to grab me and we can head into the SharePoint lounge for a longer discussion around that with an impromptu get together (could be a long one, so pack a lunch). Also I noticed there were some pictures taken at the session so if you do have that it would be great if you can direct me to where they are or send me a copy (the session was at 7PM in room 501B).

    That's it for me tonight. Tommorow I face the amazingly short shower (with pic so you get the full experience, don't worry this is with clothing) and the almost as amazing long day (complete with keynote from big Bill). A day of sessions, hanging out in the lounge, and finally coming to grips with my own inhumanity to people with one eyebrow.

    Flickr (new pics of Channel 9 guy in various situations, make up your own and join in the fun)
    Google Maps where I'm staying (Miyako)

  • PDC Day 00 (A new camera)

    While the day is just winding down, I managed to find the incredible toy district here in L.A. and replace my lost camera. L.A. seems to be broken down into districts. There's the bank district (where most of the office buildings and banks are, so appropriately named). The jewelry district where you can get the latest knock-off tiaras and whatnot. The fashion district where Gucci and Louis Vuitton clones are more prominent than a gaggle of Jango Fetts (okay, that's a geek reference in case you missed it). And then there is the toy district. Yes, an entire district where you can buy toys and electronics and pretty much every other odd and end (like a 50 quart (50!) pot which is great for cooking copius amounts of chilli, or small nocturnal marsupials; which I'm sure happens here all the time).

    There are probably other districts (the overpaid Hollywood actors who starred with Kevin Bacon district?) the but it was there in the toy district where I found a suitable replacement camera for my stupidity. I was able to haggle for a new Olympus C-60 camera. Pretty nice with 6.1MP, lots of modes (auto, aperture mode, shutter mode, etc.) and got a 256MB card thrown in (to replace the crappy 32MB that comes with it). All this for $200USD so I don't really care where the guy got it from. It turns out to be better than my old FinePix camera, still uses the xD cards (which I'm happy with and plug right into my laptop) and has lots of great modes for taking better pics. Here's the first pic of the PDC swag that I got when I registered this morning.

    There's a lot of great stuff here. First off the bag itself is pretty nice. Well built and lots of nice components and compartments. The only problem that I have with it (that others have commented on) is that it can't handle anything bigger than a 15" wide laptop. These days I think everyone is getting the 17" widescreen ones. Oh well, can't please everyone. There's some sweet stuff in the swag including a free subscription to Visual Studio Magazine (Thanks PDC!) and the even better wristband that's required for us to wear which will let us in Wednesday night to Universal Studios for a night of debauchery. Also included are some nice CD/DVDs including a pretty cool package of some Smart Client apps that you should load up and check out.

    So the pics are back (at least until I lose this camera) and you check my Flickr blog below for all of the images over the next week. Hopefully I'll have the pics showing up on the group Flickr pool site but I've been a little technically challenged with my posts. Flickr didn't seem to be grabbing the images (even though I have the "pdc05" tag) and my blog entries haven't been showing up on the PDC blogger site (even though I'm listed as a PDC blogger). Whatever. Stay tuned for lots of great pics tommorow starting with Big Bill G. and the keynote speech (yeah, pictures of a billionare talking are not very exciting, but hey go with the moment).

    Off to find some kind of nightlife. Feel free to bug me on MSN ( if you want to hook up and make fun of the locals (after a few rounds of course).

    Flickr (new pics are up with my new Olympus! Hurray for the Toy District!)
    Moblog (some new pics including me in my shower, stay tuned for blog tommorow on this)
    Google Maps where I'm staying (Miyako)

  • PDC Day 00 (Later that same afternoon)

    Wow. What is it with me and trips? I come to a new city and first there's a terrorist threat, then I lose my camera and now there was a power blackout. I was heading back from PDC to the hotel and we started to hit various traffic lights that were out. After driving for awhile, we noticed it was a blackout. I hopped off the bus and asked a couple of LAPD officers walking the beat here in Little Tokyo and they said it was out for about half an hour. I was going to just hop back onto the bus and head back to PDC (where there is power) but as I walked into my hotel, the lights came back on. I personally attribute it to my own electric personality. Looking down the street, all the lights are blinking but at least they're powered now.

    What is it with drivers? When the lights go out, you treat the intersection as a 4 way stop. Here in L.A. the drivers basically run as they see a whole, and god help any pedestrian running across the street at the time. Anyways, on the bus ride back to the hotel we passed through various districts. The jewelry district was cute but nothing I need (right now). Then we hit the fashion district. Good to know. I saw a trickle of electronics store scattered amongst the Gucci knock-offs but then lo and behold... the TOY district! Yahoo. I'm going shopping (as long as the power lasts anyways).

    Flickr (no pics yet but there is hope in sight courtesy of the TOY DISTRICT!)
    Google Maps where I'm staying (Miyako)

  • PDC Day 00 (AFT)

    Hi guys. I'm blogging from PDC after registering this morning. The setup is pretty freakin' impressive (and huge). WiFi everywhere. Geeks everywhere (not a good looking woman to be had) and more PDAs and laptops than you can shake a stick at. Tommorow is the big launch day with Bill G. in da house giving the keynote. Until this we struggle to look for a nightlife, parties to crash, and bars to upheave. Hooked up with Angus Logan and we wandered about the town trying to find a camera store and a place to get a mobile SIM for Angus. The people of L.A. are a little off as they keep looking at me like I have three heads everytime I ask someone for a place to buy a camera. I mean, there's a jewelry district here so where the hell is the geek district? You know, the place with all the geek stores side by side and I can just max out my credit card? I suppose if I asked them I wanted to buy a suitcase full of uncut coke they could direct me to that (and would maybe he have a camera to sell me?). Anyways, the quest goes on as I try to find a camera replacement, a nightlife and some semblance of fun in this town.

    Flickr (no pics yet as I struggle to find a camera store in the %#$%@ town)
    Google Maps where I'm staying (Miyako)

  • PDC Day 00 (AM)

    It was a dark and stormy night and all around.. oh wait. No, wrong blog post. It's sunny and 80,000 degrees here in L.A. and the night was quiet. No earthquakes or terrorist attacks from some valley guy (yeah, I picked a great time to visit a new city). No word yet on my missing camera so I'm going to write it off. The good thing is that I'm located in Little Tokyo so I just have to fall over before I'm surrounded by electronics.

    Some of the broken things I was experiencing earlier are working now. I have the Julian thingy working on my PDA now and downloaded the sessions. They've updated it to include things like the .NET Rocks trivia contest tonight (yeah of course I'll be there, like you had to ask?) and the BOF sessions. Nice. Although with good comes the bad. After unpacking everything I forgot the power cable for my external drive. I had all my virtual images on it and was hoping to play around with some new stuff this week that I had. Sigh. Even with a checklist this nerd just doesn't get it. Let's see, 1 day here and I lose my camera, and forget my power cable. At least I have the power for my laptop and other goodies. Can't wait to see what happens later in the week.

    Anyways, I'm off now to hunt down and kill some breakfast here then down to the conference centre to check-in or whatever and get some geek booty.

    Flickr (no pics today as Mr. Fuji has going MIA)
    Google Maps where I'm staying (Miyako)

  • PDC Day -01

    Well that went well. Checked into the Calgary airport at 4pm for a 6pm flight. Hey, it's Calgary. Expect to show up about 20 minutes before the flight for domestic and an hour (or so) for international. I don't know what it is with our airport, but waits are pretty short and it's actually a pleasant experience (at least as far as airport experiences go). Spent about 25 minutes waiting in line then 5 minutes telling the attendant where I was going, what I was carrying, etc. etc. Another 15 minutes or so getting through customs and I was ready to go. The take-off worked which was a good thing. It's pretty cloudy here in Calgary (which comes directly from it raining the last 3 days straight) so got some pretty cool shots as we were taking off. Of course check out below how those pictures are probably gone into the ethers of the tangent universe forever now.

    The flight is longer than I thought. I keep forgetting I'm going over the great imaginary line of "set-your-watches-ahead-an-hour". So it's actually 3 hours cramped in my 18F seat (note to self: next trip I'm going Executive Class so I have some leg and elbow room). At least I was 1 seat away from the emergency exit so in the case of unexpected meteor strikes (I was watching the skies) I'll be pretty good. Just a quick hop over the seat in front of me and I'll be boucing my way to freedom.

    We landed in L.A. with relative ease but the dude in 17D (you know who you are) kept staring at the hot German babe as she was getting ready to leave. I kept looking at him as if he was maybe finding a good thing to say to her, but he just stared at her boobs. After a few moments he glanced up to see me looking at him (at which time I shifted my glare to his 60ish old wife). He smiled briefly but knew he was caught with his hand in the cookie jar. Yes, that was the most eventful thing of the trip. Two things I noticed on the way down here (and I haven't flown for a few years, so bear with me) but a 3 hour flight with no dinner? And no movie! I got to watch a crappy episode of That 70's Show, a bunch of PSAs for various services, and (yes, I find it hard to believe to) a documentary on Lemurs. Yeah. Lemurs. And they wonder why people commit random acts of violence on flights.

    I'll also admit that I guess I'm not as clever as I think I am sometimes. I was taking some time last night as I got my crap together and realized a few cool things I stumbled across. First there's a pretty slick .NET app that will download the PDC sessions to your PocketPC and download various notes and whatnot. I tried hooking it up but I'm running Windows Mobile 2003 on my Dell Axim and it keeps yelling at me like an angry housewife about it not being compatible. It runs however but the login didn't work for me. Sometimes I wonder how I get my laptop booted some days. Second the PDC guys have come along with a wicked night at Universal Studios for all attendees. Free of charge (of course).

    So I finally get to the hotel after a bitchin' ride that shaved all but a few years off my already dwindling soul. The driver seemed like a cheery fellow (telling us how Paris Hilton takes shuttles too) but then proceeded to burn rubber throughout LAX with 9 people in tow (and me digging my fingernails into the seat in front of me). He said at one point that it took him and hour to get somewhere the other day. I'm a calm guy and will believe a lot of things that are fed to me but if that dude ever took an hour to get somewhere I'll eat this blog posting in public. The hotel I'm staying at (the Miyako) isn't bad but I got a bit of a shaft on the Internet site and comments from it. It's fine and all. Clean. Quiet. On a side-street so not a lot of traffic. However it just seems plain. Next year it's the Wilshire Grand or something a little more upscale.

    And to top the day off, I seem to have lost my digital camera. Yeah, stupid me must have lost it in the shuttle or when I tripped getting out of it (trust me, I was running as fast as I could from them once it came to a complete and utter stop). So now here I am, a day away from PDC and I'm going to have to go find me a new digital camera to carry me through the conference. Bummer. Didn't really want to drop another few hundred on something as silly as that but my poor camera phone just doesn't cut it and I doubt I'll get my old FinePix back. Oh well, off to shoppping in the morning.

    I'm still struggling with what to do with myself off-hours but I'm heading out to the PDC Underground event and the Universal Studio night is going to rock. Otherwise I'll just wander the streets of L.A. hoping to find something fun to do. Maybe I'll roll a homeless person, start a small racial-based riot, or just stand on the corner waving a sign "Will code for food" and see where that takes me. With losing my camera, I might change that sign to "Will code for electronic equipment" so take pity on the poor Canadian boy.

    Flickr (no pics today as Mr. Fuji has going MIA)

  • PDC Day -02

    Here we go. We're counting down to PDC and we're at Day -02 (PDC doesn't officially start until Tuesday and I'm a 0-based counter just like C#). I'm sitting here going through my sessions, getting my papers ready for the evil border police (waving the Canadian flag at them just doesn't cut it anymore), and otherwise panicking as I'm sure I'll forget something. Here's my checklist for the event:

    • Passport and money to bribe border officials, needed to get past the security drone at the airport (note to self: don't use Monopoly money this time round)
    • eTickets for flight, pretty necessary if I want to get onto the actual plane (other than waving a bar of soap that might work but it's raining in Calgary so it might sud up, 10 points to Gryffindor who can name the movie that's from)
    • Extra large bag with minimal clothes so I have room for all the geek toys I'll pick up in L.A. and the conference (or whatever else I pick up, homeless people, small marsupials, etc.)
    • Earthquake-proof Presario R4000 laptop with enough games and music on it so I can keep myself occupied (or at least look that way)
    • Laptop case for said laptop so I can take it on the plane with me. After all it's been days since I was last at CPR so controlling safety critical software with a computer is just in my blood.
    • More USB flash drives than you can shake a stick at so I can quickly steal any content that happens to be lying around at the booths.
    • 80GB USB external drive with my virtual machine images and various other stuff (porn of course) so I can show off whatever we geeks show off at the conference.
    • Official Microsoft "I'm an uber-geek" clothes and badges so everyone knows how nerdy I really am
    • Canadian flag on pretty much everything just in case America is invaded by misplaced Peruvians. I figure they'll put us Canucks in hotels because they pity our lack of indecision/responsibility/whatever with the NAFTA.
    • A ton of AA batteries for my MP3 player and digital camera (no, nothing else is battery powered so don't even go there!)
    • My name written into my Spiderman Underoos just in case I get lost. If you see a nerdy looking guy wandering the streets of L.A. next week, check the tag and return to sender.

    One thing about PDC sessions. They have a nice feature online to launch a calendar object so you can add it to your Outlook schedule. However my Outlook is on my desktop so I'll be syncing with my PDA. When you launch the iCal file, it automatically adjusts the schedule to whatever your current time zone is so all my sessions are 1 hour off. I only realized this after adding them all to my calendar but for those that are doing it this way, just keep an eye out for that.

    You can track me through this blog everyday from now until I last (or I come back to Calgary). I'll be posting through three different mediums:

    1. Through this blog (which will become part of the bigger tagged posts)
    2. Through my own Flickr page here (which will also appear on the official PDC Flicker tagged photos here)
    3. Through my photoblog on if I catch anything with my camera phone that I can't with my camera (lower res but handy for those public police beating type events that come up)

    Well, it's off to bed shortly and a new blog tommorow as I face my annual full body search event at the airport. Cheers!

  • Compliance Server Public Beta

    I've been testing a new add-on for SharePoint called 80-20 Compliance Server (hey, I don't make these names up) for some time now and it's a pretty nice package. The team responsible, 80-20 Software, has been quite voracious in getting new builds together, responding to feedback, and keeping the product up and stable in the last few weeks.

    The package is made up of a few components that site next to SharePoint (including a server, Web Parts, admin tools etc.) and is primarily targeted at managing the retention lifecycle of content in SharePoint. It does this by applying business rules that you define to handle the retention for you. This is a little more than just archiving as it has search and other goodies for the documents and just doesn't offload something to a tape farm but applies business processing against them like what should be retained, how long they should be kept, etc. It's quite nice and has some added value if you're looking for this sort of thing that SharePoint doesn't provide OOTB. It also has a SDK (unfortunately I haven't had a lot of time to play with yet) which allows you to integrate their system with your own CRM, ERP, or whatever you want.

    The official release of the public beta is for Monday but you can check it out now on their page here and join the public beta program.

    Also I'm leaving Cowtown on Sunday for PDC all next week. Can't wait to meet everyone out there so be sure to look for the big geek spouting SharePoint goodness to everyone. Stay tuned to the blog for daily blow-by-blows, pics, and of course the infamous Whack-a-Fitz videos (subject to participation and state and federal export laws).

  • The Goodbye Caboose

    The blog has been pretty barren the last while but last week I made a pretty big decision and submitted my resignation to my current employer, Canadian Pacific Railway. I had been with CP since 1996 (my 10 year anniversary would be April 1, 2006) and it was the longest I was with an organization (previously I was at H&R Block for 3-4 years). Many opportunities came up over the years, but I stayed loyal to the railway. Finally an opportunity and circumstances came up that I couldn't pass on. It was a tough and hard decision but the right one for me.

    It's been a great time with CP and I've done a lot of amazing things over the years and moved the IT department in some pretty interesting directions. As CPR is primarily a railway, it's hard to actually get the business to buy into this whole technology thing (don't even ask me about introducing Agile to a Railroad) but I was pretty instrumental in getting the organization to adopt new versions of software the same year it was released (yes, sounds silly but it actually was a challenge). CPR was the home where I was exposed to and introduced SharePoint (I'm sure they'll hate me for that) and it was a fun place to write software that controlled 120-ton trains and the track they run on (yeah, you can feel worried at railroad crossings now that you know who's software is behind them).

    Anyways, I'm off now into the wild after almost 10 years to bigger and better things and will be working in the private sector doing SharePoint and .NET Architecture and Consulting for a variety of clients. New daemons to battle, new technologies to conquer, new Microsquishy people to badger, and new expense budgets to blow. Hope the next 10 years are as fun as the last 10 were (at least I won't be crashing any trains anytime soon).

  • My Sessions for PDC

    Seems like a lot of people are posting the sessions they're attending at PDC this year so why not join the lemmings. Here's my picks that I think I'll stick with. Going to be a busy week but looks like nerd heaven. Mostly slanted towards SharePoint (well, duh!) but some Architecture sessions thrown in and I'm sorry, but no geek can miss Anders Hejlsberg talking about future directions in languages. After all, he is the father of Delphi and C#.

    Schedule for Bil Simser

    Tuesday, September 13
    11:45 AM - 12:30 PM  
    Tips & Tricks: System.NET
    1:00 PM - 2:15 PM  
    VSTS: Behind the Scenes of Visual Studio 2005 Team Foundation Server
    2:45 PM - 4:00 PM  
    Groove: Building Enterprise Workgroup Applications
    4:15 PM - 5:30 PM  
    Assembling, Repurposing and Manipulating Document Content Using the New Office File Format

    Wednesday, September 14
    11:00 AM - 12:15 PM  
    Windows SharePoint Services: Using ASP.NET 2.0 Technology to Extend Pages, Sites, and Server Farms 
    12:30 PM - 1:15 PM  
    Case Study: Revolutionizing Microsoft Axapta—Harnessing Web Services, Workflow and SharePoint
    1:45 PM - 3:00 PM  
    Windows SharePoint Services 'v3': Creating and Defining Custom Templates, Sites, Features, and Solutions
    3:15 PM - 4:30 PM  
    Windows SharePoint Services: Advancements in Document, Content, and Data Storage
    5:00 PM - 6:15 PM  
    Windows SharePoint Services: Developing Collaboration and Tracking Applications

    Thursday, September 15
    10:00 AM - 11:15 AM  
    Building Portals and Dashboards for Business Intelligence and Reporting Applications
    11:30 AM - 12:45 PM  
    Windows SharePoint Services: Developing Custom Workflows
    1:00 PM - 1:45 PM  
    Tips & Tricks: Productivity Tips for the Visual C# 2005 IDE
    2:15 PM - 3:30 PM  
    C#: Future Directions in Language Innovation from Anders Hejlsberg
    3:45 PM - 5:00 PM  
    ''InfoPath 12'': Developing Forms for the Smart Client and the Browser
    5:15 PM - 6:30 PM  
    Surfacing Your Application's Line-of-Business Data and Actions within Enterprise Portals

    Friday, September 16
    8:30 AM - 10:00 AM
    What’s Next for Microsoft’s Web Platform
    8:30 AM - 9:45 AM  
    Architecture Symposium: Connected Business, Connected Systems
    10:30 AM - 12:00 PM  
    Advances in Agile Development
    12:00 PM - 12:45 PM  
    Tips & Tricks: Developing and Testing with Virtual PC
    1:00 PM - 2:15 PM  
    Windows Presentation Foundation ("Avalon"): Going Under the Hood to Understand the Architecture

  • Check out SPToolBar

    Caught a posting by Michael Greth on a new (at least I think it's new) release of SPToolBar, a tool put together by James Milne. James is the gent responsible for his only SPSkin tool that lets you build your CSS files for SharePoint Portal Server and Windows SharePoint Services sites. SPToolBar is a nice Web Part that provides some features that you can add to your otherwise bland pages like creating a printer friendly version of the page, sending the page as an email message, adding to your Favorites, and other goodness. You can download it directly here. Also check out James' other projects on his home page as they look pretty interesting!

  • Congrats to BONK!

    The Channel 9 guys have made their decision and the decision is good. Bonk has won the Blog'n my way to PDC contest with his excellent entry with his plans to use Avalon (Windows Presentation Foundation for all you zealots). Very cool stuff and check out the impressive video on his site. I'm looking forward to seeing what he does with WPF and .NET so he's on my blogroll now. I'm just hoping I can find some time in the next couple of weeks to do some cool stuff to show off at PDC at the Show Off event. Time to break out my DX toolkit and dust off my aging graphics skills again. Congrats again Bonk for a well deserved win (and Happy Birthday!).

  • Modifying the Horizontal Navigation Bar in WSS

    Ever wonder what you can do with the horizontal navigation bar in a WSS site? Yeah, keeps me up at night too. There are two ways to modify it:

    1. Modify it using a custom site definition via the ONET.XML file
    2. Crack open the site in FrontPage 2003 and modify it that way

    Both are valid and I'll leave the modification to ONET.XML for another day. Here's a visual walkthrough of how you can change it with FrontPage and about 5 minutes of your precious time.

    First here's our glorious site before we're about to go Dr. Frankenstein on it. Just a plain, ordinary, everyday, simple team site that we're all familiar with.

    Now let's launch FrontPage 2003 and get dirty. Click on the Edit with Microsoft Office FrontPage button in your IE toolbar. After you open the site in FrontPage there's a section of code that contains the navigation bar. It's just a FrontPage web bot. You can see it highlighted in the split-screen view below. Note that the links and names are not kept in the source code of the page.

    So now we want to modify the navigation. Hover over the navigation bar in the Design view and you'll see the icon change to a small hand. Double-click it to launch the Navigation Bar Properties dialog. Here's where we can screw with what gets displayed to the users, the order of the links, the style, and even the ability to add new links.

    Select a link (Home in this example) and click on the Modify Link button. This takes us to the Modify Link Dialog where we can change both the title of the link and the url it takes us to.

    Okay, so go nuts. Feel free to make whatever changes are appropriate for your needs. Add a link, change one, reorder them, whatever. Here's the "After" effect after we messed around with the navigation bar. I changed "Home" to "My Home", removed the "Documents and Lists" and "Create" links, renamed "Site Settings" to "Administration" and added a new link called "Google" that took me to, well, you know where. Oh yeah, and the beauty of this is that it doesn't unghost your page as the information is stored in the site and not the page. Cool huh?

    In a future release I would really like to see this web bot hooked up to the security of the site so you can choose an invidual link and attach it to a security group that's in your SharePoint site. Actually since it's a web bot, you might be able to create a custom one that does this. Never created one before but maybe I'll take a look at what that's like and go down that road (or if someone out there has the time feel free and let me know what you come up with).


  • All good things (hopefully) come to an end...

    Well the PDC Blogging Contest is over now and we're all waiting with baited breath on who the lucky ones will be. Like Charlie Bucket, I didn't get the hundreds of referrals as others did as I haven't been in the blog'o'sphere for very long (only a couple of years) and still need to win the hearts of millions. In any case I will still be at PDC (plane tickets are done and hotel is in the bag) and I still promise to blog several times a day on SharePoint V3 with pics (assuming I'm sober and able to operate the digital camera and the computer, no easy feat) and whatever other goodies I can uncover and reveal to you, true believer.

    This week is a little nuts so if I'm absent (or my posts seem like mindless incoherent rants, even more so than normal) just bear with me. I'm down to the (hopefully) final hours of my living hell that I've been in (a project that keeps adding new requirements and budget to itself everytime you look at it) and it's driving me bonkers. Of course "hours" on a project like this probably means a few weeks/months so I'm looking to escaping for a week at PDC that much more. Yes, I'll be going on a technology bender that week probably buying everyone iPods if they'll be my friend and coding Web Parts for food.

    Here's a backlog of some stuff on my TOBLOG list and project work I have in the hopper that you can watch for:

    • SharePoint V3 and Office 12 Blogging (stuff that I can reveal and whatever is blown out at PDC)
    • SharePoint Template Project updates (have a few templates in the wings now so I'll be getting in touch with you guys shortly with the installer)
    • Have to update my woefully outdated SharePoint wrappers soon as there are a few people that need it for some remote admin tools they want to build (the current Wrappers don't provide hooks into the admin services, not that there are very many to use)
    • A few blog postings with little config and coding tips that have accumlated the last few weeks

    Also three special things underway on my side of the world:

    1. A cool new SharePoint project that I've been picking at for the last while which should help custom Web Part developers (if you're into the self-multilating way of building Web Parts from scratch like I am).
    2. Another uber-cool project that's starting up with some other MVPs and Microsquishy guys (think podcasting even if it is so 2005)
    3. Some book projects are underway that I'm contributing to at various levels, all SharePoint related (of course)

    Yeah, lots of cats that I'm juggling right now (not to mention my new laptop that just kicks and my new Mac mini that kicks the laptop even more, it's pure electricity-draining-techno-heaven at my house right now).

  • Updates to the SharePoint Template Project

    Thanks for the great response from everyone on my SharePoint Template Project. I think it's going to be a great resource and I've already got a few people with things in the pipe already that are coming down for submission. I've made three adjustments to the project since starting it up based on some comments and email from a few people (thanks Maurice!).

    First, the installer will use the Microsoft Installer XML (WiX) which is a project that builds installation packages from XML source code. I thought it only fitting to use another SourceForge project that Microsoft endorses to deliver the templates. Second is the change of license. I originally selected the GNU Public License (GPL) as the majority of projects are released under this but some people mentioned concerns about derivative work so I switched the project to use the Common Public License which is easier to understand, more flexible and better protects the submitters and their content. Third is not really a change but something I had totally forgotten about which was supporting languages other than English. I'm always stuck in English land with things but was reminded about the other 90% of the planet and the frustration of not having templates availalble in their native language available. So that'll be included in the new web site that's being setup for the project and part of the installer. Once a template is submitted they'll be the opportunity if someone can translate it for their native language and we'll just update the release of that template to include it. Hopefully we'll have a nice collection of templates in all major languages available for everyone as a result.

    Again thanks to everyone who responded positively on the project and looking forward to working with you all on creating this much needed community resource!

  • Introducing The SharePoint Template Project

    Hi guys,

    With all the buzz about the recent templates released by Microsoft there seems to be a big "sigh" from the community. Not having custom solutions has been one of the larger gaps in SharePoint but demonstrates that you can accomplish a lot with just a little configuration and some creative thought. On numerous occasions I find myself in the newsgroups seeing people asking if they can build a Help Desk with SharePoint, or an Expense Tracking System, or a Call Board. The answer is of course yes. Always has been and always will. The problem however is that you don't get a lot of business solutions delivered without some work. Enter the SharePoint Template Project.

    I created a new project site on SourceForge (yes, I'm not a big fan of GotDotNet and we haven't created my utopia of SharePointForge just yet) to accomodate this. The project provides an outlet for the SharePoint community to contribute and share list and site templates for the products under the Microsoft SharePoint technology banner (SharePoint Portal Server and Windows SharePoint Services).

    These templates come in the form of binary .stp files or plain text xml schema files (along with any additional files like images, etc.). Users create the templates
    either using SharePoint itself (saving them in .stp format) or with whatever xml/text editor they prefer. The templates are uploaded to a SharePoint server and used as a boilerplate by SharePoint during site creation.

    Templates in this project will be created by the community and packaged in a common installer format (MSI) so that end-users need only download the MSI
    and run it on their SharePoint server. A template MSI will be provided for contributors to the project which includes the template installer, full or custom selections for installation (users will be able to choose what templates they want to install), graphical preview for each template (if the developer includes them) and option to create sample sites based on the templates chosen.

    Currently there are a few handfuls of templates out there that are available (the 30 Microsoft recently released, a dozen or so from a FrontPage Customization site, and a smattering of some here and there from some individuals). This project intends to provide a central outlet for both creating and sharing new templates and puts it together in a nice package so you're not stuck spending hours installing the latest batch.

    I'll provide the MSI package that will install these, all you need to do is join the project and contribute the content (I'll put together some templates as I can find time as well). The templates can be anything (a blog, a project management site, a time sheet tool, whatever) so if you have something you can share let me know via email or join the project (you'll need to sign up to SourceForge or send me your SF name so I can add you). As SourceForge only allows open source projects, all templates in this project are released under the GNU General Public License (GPL) so be sure you understand that before you submit anything.

    Here's to building a centralized community for sharing templates for all sorts of solutions using your favorite tool and mine, SharePoint! You can find the SourceForge Project Site here. Thanks!

  • Fixing InfoPath Forms in Application Templates

    With the recent release of the 30 or so (have to be careful as the number seems to change everytime you look at it) WSS site templates that Microsoft has provided us, some people are scratching their heads wondering why these OOTB solutions are not so out-of-the-box. Read on to find out why and how to correct these problems.

    For the most part, the sites work fine. Install the template, create a site and you're off to the races. For some however there are parts of the sites that will challenge you for a credentials and others that ask for locations of Web Services. This is part and parcel in the way that InfoPath forms are stored and work with Windows SharePoint Services.

    With InfoPath forms stored in a WSS site you can (with Service Pack 1 installed) consume the Web Services that WSS offers and use this to populate drop down lists, lookup tables, etc. in your InfoPath form. This is great for something like a request form where you want the lookups to be dynamic and controlled. It does however present a problem when you try to move the forms to another server like how the templates were offered up recently for download.

    We'll walk through fixing the Travel Request site as it's one of those ones that needs some extra care before you can start using it. You can use the principles here for any of the other templates.

    The original forms for the site were created on a specific server by the folks at Quilogy so when you click on the Submit a New Travel Request from the home page you'll see this:

    Why is the InfoPath form trying to connect to this Web Service? Simple. There are lists embedded in the form that are being loaded from it and need information from the site. Of course you don't have credentials for their site plus you'll want your forms to be reading from your own site. So here's how to fix this.

    First click Cancel on the dialog above and quit InfoPath. Now return back to the site and select Travel Request Form from the side navigation bar. This is the form library that holds the form you fill out when you launch it. Select Modify settings and columns for this form library under the Actions pane. Now click on Edit Template under the General Settings. This will launch InfoPath so we can change our form to point to our own site.

    Choose Tools then Data Connections from the main menu. You'll see the connections that this InfoPath form has back to the SharePoint site.

    So we see Departments, Employees, currencies, and Main submit. The first three are lookups and Main submit is for sending the form back to SharePoint (the Submit to SharePoint button on the form). Select Departments and click Modify. This brings up the dialog to change the settings for this connection:

    The first page is the URL to your SharePoint site. This is the main thing to fix because we want to point it to our own site. Enter the URL to the site here and click Next.

    You'll notice that it took a second for the next step to come up. This is because the Wizard actually goes to your site and pulls back the lists and libraries that are available. If you have added one, it will appear here. Now select Departments and click Next.

    Now you need to select the fields that will be available in the form. This is usually just the name but you may need to play around depending on the form you have. Also from the Data Connection screen above it tells you some details about the connection (like if it loads each time the form loads or not). Use this information to help you decide how you want things configured. For now, click DepartmentName and click Next.

    The name will normally be filled in for you and you can choose to have it retrieve the information automatically. Click Finish and we're done with this Data Connection.

    When you've added one, you might want to check it. Click on File | Preview | Default (or Ctrl+Shift+B, yes, just like Visual Studio). This will launch the form and connect to the SharePoint site to fill in any initial values. If there are any errors you'll see them or if the form challenges you then there's something that's loading from outside of your site. Continue to fix the fields until you have a form you can preview. The dropdowns should now work as expected and retrieve their values from your SharePoint site.

    The last piece to modify is the submit part. This is the Main submit Data Connection and is currently hooked up to… so we want to change this. This one requires you to change the URL to the fully qualified path to the form library itself. So selected "" and replace that with your own URL (keeping the "Travel Agent Request Form" intact) and click Next then Finish.

    Now click Save and close InfoPath. Return to your site and launch the form (by clicking on Fill out this form in the form library or from the main page). The form should launch correctly and you can fill it out and click on "Submit to SharePoint" where it will save the new form back to the site and you can view it there.

    That's it. Takes about 5 or 10 minutes to clean up the template but now you're ready to use it in your own environment. Hope that helps!

  • John Bristowe crosses over to the dark side

    Just found out my buddy John Bristowe (of Quadrus here in Calgary) has now joined the Microsoft Canada team as the Western Canada Developer Evangelist! Nice job John and well deserved. John had been the Regional Director for Microsoft out here in Cowtown (non-Microsoft employee, MVP type thing) and he's also the ASP.NET MVP. Now that he's a blue badge, he won't be able to continue with his MVP status but that's cool since he's there for us development types to call on (along with Dan Sellers). You can visit John's blog here (which will probably be moving to, which strangely enough doesn't have a post on this yet (I found out via Mark Relph's blog on the subject). Again, congrats John!

  • Blogging my way to PDC reminder

    I’m Blog’n my way to the PDC!

    If you haven’t heard, Channel9 has started a contest where you can win a ticket to the PDC, including an airline ticket and hotel!  This is one amazing contest, and all you have to do to enter is have a blog, and post why you should win the prize.  So here’s my official entry:

    Click here to make Bil shutup about PDC once and for all.

    Here's some information to help you get to know me better:

    Why me?

    Why do I want to go to the PDC? Because I love to blog! And I'm prolific! Here's some of my more popular blog posts links according to Google :

  • Fear and Loathing
  • Adjusting the DisplaySize of your Fields
  • Syncronization of Office Document Properties with WSS Document ...
  • A Poor Man's Google for SharePoint
  • The Collective vs. the Individual

      Did I type up all this ugly HTML for this Blog post myself?

      Heck no!  I’m lazy!  But that’s exactly why I need to go to PDC!  The PDC is all about the future, and in the future, we’ll all be using cool technology to do things like typing tedious, boring contest entries.  I’m getting a head start on the salad days, so I figured out how to use ASMX web service that Brendan wrote! To prove it, you can see that I'm on this list of other, lazy coders who would rather sit back and use a distributed Web Service to do their work!  

      Yeah, I'm persistent. Just click on the little bloghead above if you want me to shut up.

    • Application Templates Online

      Hi guys. With the recent release of the 20 30 60 Windows SharePoint Services site templates from Microsoft I decided to install them on my public SharePoint site for anyone to check out. You can find a summary Web Part Page here that lists all the templates with their descriptions and links to each site itself. These are only using the Custom templates as the Basic ones are the OOTB look and feel for SharePoint and not very interesting to look at.

      A few caveats about the sites I setup. This is setup so you can test drive the look of the templates to see what they offer. I have created a guest account that anyone can use (please don't abuse it) to contribute to any of the sites. When you hit one of the sites please use the following infomation:

      User name:\spguest
      Password: SharePoint1

      Also the InfoPath forms are tied back to the SharePoint Web Services from the original site they were created from so opening them usually produces a challenge dialog from that site. I'm not going to go in and fix that, but it's about a 5 minute job in InfoPath if you decide to install the templates in your own environment.

      So feel free to explore, learn, and share your thoughts on the new templates. Enjoy!

    • Join me in a Birds of a SharePoint Feather session at PDC

      Stuart Celarier posted a blog (thanks Amanda!) about the Birds of a Feather sessions at PDC and was looking for submissions, ideas, and volunteers. I decided I would step up and offer to host a session, assuming there's interest from you, the community (oh yeah, you need to be there to participate to get the full effect, as if you hadn't clued in yet). As I spent the last 6 months building a 100,000 line custom business app on top of SharePoint I thought it would be appropriate to take a deep dive into doing something like this and the challenges and agonies of completely building a custom business solution on SharePoint. Here's the submission:

      Submitter Name: Bil Simser
      Company: MVP
      Session Title: Custom Business Solutions in SharePoint
      Session Level: 400
      Session Abstract: This session will dive deep down into the heart of SharePoint development and building custom solutions on top of, around, and inside of the SharePoint Object Model.


      It'll be pretty techie (techy?) with lots of whiteboard diagrams of layers and tiers and abstractions oh my. Anyways, if you think this might be interesting feel free to vote for it if/when it appears on the site here. Also as this is informal (we'll have a whiteboard but no PowerPoint or laptop) we'll just wander around and see where it takes us. I'm planning to demonstrate and discuss some of the more typical challenges of working with SharePoint development, designing business solutions from a Domain perspective and keeping your Domain Model clean, NUnit testing with SharePoint, development environment woes while keeping your codebase cleanly separated from the SharePoint OM, and other good stuff (still just thinking it through in my head how it would go). If anything it'll be a fun hour or so or at least give you a reason for you to hit the bars early.

    • 20, no wait 30 (but really 60), OOTB Solutions for SharePoint

      Microsoft downloads has a nice present today. 30 WSS site templates that you can use, customize, etc. Very, very slick. I was asked to review some of these awhile ago and made some recommendations but didn't realize they were going to be part of a package like this. Here's the rundown of what's available:

      • Competitive Intelligence
      • Absence Request and Vacation Schedule Management
      • Project Team Management
      • Board of Directors
      • HelpDesk Dashboard
      • IT Developer
      • Employee Training
      • Marketing Communications Campaign Site
      • Employee Scheduling
      • Legal Document Review
      • Classroom Management
      • Meeting Management
      • Change Management
      • Loan Initiation Management
      • Professional Services Contractual Setup
      • HR InfoPath Forms
      • RFP Management
      • Event Planning
      • Expense Report Portal
      • Room And Equipment

      Very cool stuff and lots to play with. Check out the templates here and start building! Thanks to Renaud and Daniel on reporting this and thanks to me for regurgitating it.

      Update: Each one listed above comes as a Basic Template and a Custom one.

      Update #2: The custom templates look great. Basic templates are stock SharePoint look and feel. Custom ones have been jazzed up with FrontPage but are still SharePoint behind the scenes. Below is the Basic version of the RFP Template:

      And this is the same content using the Custom template:

      Update #3: Seem Microsoft is clever and we bloggers were talking about things before it was complete. The final toll - 30 templates each with a Basic and Custom version so that's 60 altoger. The additional 10 that were added after my first post about the 20 are:

      • Case Work Management
      • Employee Activities Site
      • New Product Development
      • Performance Review
      • Professional Svcs Contracts
      • Professional Svcs Site
      • Public Official Activity
      • Pulic Relations Work Site
      • Recruiting Resource Center
      • Travel Request

      Update #3: As much as I like Microsoft for publishing these, there's been a few reports of problems. Heather said she had problems with adding a Web Part Page to a site and I just found out that some of the InfoPath forms are messed up. When you try to open a filled in for it complains that the xsn file isn't there. It is and you can design the form without a problem. Another issue is that a lot of this stuff seems to be hooked up to external sources (the InfoPath form I looked at needed credentials for a web service it was calling). So there's a bunch of work to be done to make these clean and usable but good attempt at Version 1.0

      Thanks to some other Bloggers, TechNet has a great page for this now here with all 30 template packages, a small blurb, a thumbnail, and a link to the download page for the package. Enjoy.

    • What you create isn't what you see

      Man, what a day. First off somewhere along the line I deleted my IE7 post accidently and now there's a pretty sufficient fire blazing at Toronto airport from an Air France plane that skidded off the runway. Yeah, a blog posting doesn't seem that significant after an event like that. Anyways, I don't think my IE7 post got cached because of the short time it was online but oh well, nothing too important. Note to self: blog offline first, then post. Yeah, I do things the old-fashioned way right online. I should know better.

      Anyways, todays fun ways to torment your SharePoint experience is about what you create using custom definition files and what you get on the other end isn't always the same. Actually it's better.

      Let's say you want to create a custom list so you make your copy of CUSTLIST (as we all do) and go and add some fields like so:

      <Field Name="ProjectStatus" DisplayName="Project Status" ReadOnly="TRUE" Type="Text"/>
      <Field Name="DraftDate" DisplayName="Draft Date" Type="DateTime" Format="DateOnly" ReadOnly="TRUE"/>

      Great. Now you deploy it and go into your Create page to find your new list all ready to be generated. Off you go and you have your new list with it's custom fields intact. Brilliant. But did you know that SharePoint is going to add a whack of new and cool fields that you can then use in displays? Here's the new stuff that gets added to your original definition after creation:

      <Field ColName="tpID" ReadOnly="TRUE" Type="Counter" Name="ID" PrimaryKey="TRUE" DisplayName="ID" FromBaseType="TRUE"/>
      <Field Type="Text" Name="Title" DisplayName="Title" Required="TRUE" FromBaseType="TRUE" Hidden="TRUE" ColName="nvarchar1"/>
      <Field ColName="tp
      Modified" ReadOnly="TRUE" Type="DateTime" Name="Modified" DisplayName="Modified" StorageTZ="TRUE" FromBaseType="TRUE"/>
      <Field ColName="tpCreated" ReadOnly="TRUE" Type="DateTime" Name="Created" DisplayName="Created" StorageTZ="TRUE" FromBaseType="TRUE"/>
      <Field ColName="tpAuthor" ReadOnly="TRUE" Type="User" List="UserInfo" Name="Author" DisplayName="Created By" FromBaseType="TRUE"/>
      <Field ColName="tpEditor" ReadOnly="TRUE" Type="User" List="UserInfo" Name="Editor" DisplayName="Modified By" FromBaseType="TRUE"/>
      <Field ColName="tpVersion" Hidden="TRUE" ReadOnly="TRUE" Type="Integer" SetAs="owshiddenversion" Name="owshiddenversion" DisplayName="owshiddenversion" FromBaseType="TRUE"/>
      <Field ColName="tpHasAttachment" Type="Attachments" Name="Attachments" DisplayName="Attachments" FromBaseType="TRUE"/>
      <Field ColName="tpModerationStatus" ReadOnly="TRUE" Type="ModStat" Name="ModerationStatus" DisplayName="Approval Status" Hidden="TRUE" CanToggleHidden="TRUE" Required="FALSE" FromBaseType="TRUE">
      <Field ReadOnly="TRUE" Type="Note" Name="
      ModerationComments" DisplayName="Approver Comments" Hidden="TRUE" CanToggleHidden="TRUE" Sortable="FALSE" FromBaseType="TRUE" ColName="ntext1"/>
      <Field ReadOnly="TRUE" Type="Computed" Name="Edit" Sortable="FALSE" Filterable="FALSE" DisplayName="Edit" AuthoringInfo="(link to edit item)" FromBaseType="TRUE">
      <Field ReadOnly="TRUE" Type="Computed" Name="LinkTitleNoMenu" DisplayName="Title" Dir="" DisplayNameSrcField="Title" AuthoringInfo="(linked to item)" FromBaseType="TRUE">
      <FieldRef Name="Title"/>
      <Field ReadOnly="TRUE" Type="Computed" Name="LinkTitle" DisplayName="Title" DisplayNameSrcField="Title" ClassInfo="Menu" AuthoringInfo="(linked to item with edit menu)" FromBaseType="TRUE">
            <FieldRef Name="Title"/>
            <FieldRef Name="ID"/>
            <FieldRef Name="LinkTitleNoMenu"/>
      <Field ReadOnly="TRUE" Type="Computed" Name="SelectTitle" Hidden="TRUE" CanToggleHidden="TRUE" DisplayName="Select" Dir="" AuthoringInfo="(web part connection)" HeaderImage="blank.gif" Sortable="FALSE" FromBaseType="TRUE">
      <FieldRef Name="ID"/>
      <Field Name="InstanceID" DisplayName="InstanceID" ColName="tpInstanceID" ReadOnly="TRUE" Hidden="TRUE" Type="Integer" Min="0" Max="99991231" Filterable="TRUE" Sortable="TRUE" FromBaseType="TRUE"/>
      <Field ColName="tpItemOrder" Name="Order" DisplayName="Order" Type="Number" Hidden="TRUE" FromBaseType="TRUE"/>
      <Field ColName="tp_GUID" ReadOnly="TRUE" Hidden="TRUE" Type="Guid" Name="GUID" DisplayName="GUID" FromBaseType="TRUE"/>

      Nice. Lots of great new columsn here that you can do things with in views, grouping, filtering, etc. The best part is that you can define this before these fields are created. Go ahead and put the ID field in for sorting a view or add the Order field to a view so you can see how SharePoint is sorting your list. Most of them are pretty self-explanatory like Created and Modified are DateTime fields when the item is created and updated. Author and Editor tell you who it was by. Edit is a cool one because it displays an Edit icon that links to your EditForm that's attached to the list. LinkTitle is the typical SharePoint menu you see that will allow you to check files out, edit in the appropriate client tool (Word, Excel, Powerpoint, etc.)

      Anyways, something simple but keep it in mind when you're designing solutions as you can leverage these items. Have fun with it and as always use it for good, not evil.

    • I see dead pages

      Who isn't afraid of ghosts? I am. Really. Disembodied spirits that aimlessly roam the Earth looking for souls to inhabit, haunt, or consume just isn't for me. However this post has nothing to do with ghosts but rather ghosting which strangely enough is not the art of hunting ghosts but rather touching SharePoint site pages using FrontPage.

      There's been a fair amount of discussion on ghosting and unghosting pages in SharePoint. What it means, why should I do it, does it affect performance, etc. I'll leave those fabulous resources below alone on this but wanted to pass along a tip that I personally use to avoid ghosting completely.

      1. Create a web part page with just a single zone and put it into a scrap document library
      2. Place any web parts on that page and crack that page open in FP to do whatever you want with it (say convert it into a DVWP)
      3. Export the customized Web Part from the browser when you’re done all your modifications
      4. Import the DWP file back onto a normal site

      Optionally you can delete the web part page you unghosted or the entire document library if you please. I keep mine around and use it as a sandbox so I’m not munging with my production sites in real-time with anything that end users would see. Works pretty well and never gets me into the place of having to re-ghost (using something like GhostHunter) my pages in a production site.

      Here are a few great resources to get the big picture on ghosting:

      And while we're talking about ghosts anyways, here's some great haunted house sites which have nothing to do with SharePoint:

    • A new toy

      Been a pretty busy week and here in Canada we have a long weekend (still can't remember what we get the day off for but hey, who's to argue). I picked up a Compaq Presario R4000 yesterday in light of needed something to take with me to PDC and the MVP Summit coming up in September. I was originally going to get a different model but this one just looked that much better. The Athlon 64 processor and an ATI Radeon XPRESS 200M graphics card just blows away the lightweight Centrinos IMHO. It's a great machine for development as well as presentations so I'll be blogging like a madman with it down at PDC (and getting my kicks with a few rounds of Unreal Tournament 2005). Anyways, back to the grind...

    • AddFieldAsXml... I wish this monkey would go away

      Oh the horror of it all. You would think that XML is XML is XML. For whatever reason unknown to mankind, the order of CAML (and what combinations go with what) just don't add up. Some things make sense (like allowing multiple values for text fields doesn't make sense) but the order? I still have to wonder if Microsoft is using ordinal values to extract attributes from the schema as all I've done is moved an attribute to the front of the CAML statement instead of the end and BOOM! I've given up on any kind of validation tool for CAML right now because the permutations of what works and (more importantly) what doesn't is way too consuming. I am however putting together a spreadsheet with all the <Field> attributes with a cross reference against types. It goes something like this:

      Attribute Attachments Boolean Choice Computed Counter etc.
      Aggregation No No No Yes Yes etc.
      AllowHyperlink No Yes Yes No No etc.

      You get the idea. A matrix of what attributes are valid with what types you can define for a <Field> tag in CAML. This was put together out of frustration with what attributes I should/could use for any given type. I'll publish this for anyone who's been scratching their heads on these properties as a cheat sheet of sorts when I get it completed, hopefully by the end of the week (barring any more distractions).

    • Cracking the code... err, sequence

      Sorry, been reading the Da Vinci code too much lately (don't ask me how anyone could make a movie out of this, maybe with Dan Brown sitting in a chair counting his money for 2 hours?).

      Anyways, as a follow-up to my AddFieldAsXml post there's a problem with this silly method that has provoked me to build a tool. On top of the issue with the whole Name vs. DisplayName thing, the Field CAML you pass it has to be in a certain order. Do not pass Go. Do not Collect $200. The kicker is that certain combinations of CAML make it throw a lovely exception that says (drumroll kids...) "An Error has occurred." Yup. No message (that is the message). No inner exception. A cryptic error number that couldn't possibly be a lookup into anything (especially since it's a negative number). No recovery. No hope.

      What a PITA. So it prompted me to build a mini-SCHEMA.XML parser and validator. I'm just going through the matrix of combinations of attributes you can and can't use and what order they can (or cannot) be in to work. So the tool is just a silly desktop thingy. Paste in the <Field> CAML and it'll tell you if it's valid based on the rules I'm coming up with now. Like I said, there seem to be a never ending myriad of combinations that work but just as many that don't. It's very very odd, as if Microsquishy is looking for certain attributes based on ordinal position or something. So a few more hours of screwing around, digging through Reflector as far as I can go into the SharePoint libs and I'll have a tool for you to use. I'll leave it to someone to blow it out to a full blown SCHEMA.XML validator as I don't have the patience after todays SharePoint Episode from Hell. Back later with screenshots and source code.

    • AddFieldAsXml cannot be used to set the InternalName correctly

      All fields in SharePoint lists (and doclibs which are specialized lists) have two names. An Internal Name that's used by SharePoint and the Object Model (among other things) and an Display Name which is what you see in your Browser. There are four ways you can create a new field on a list in SharePoint.

      1. Simply use the Web Interface and add a new column. When you add the column, the name you give it at creation time is set as both the Internal Name and the Display Name. Anytime after that when you change the name you're only changing the Display Name.
      2. Create a custom site definition with SCHEMA.XML. Here you can set both the Internal Name and Display Name but the user would be able (with the right privledges) to change the Display Name.
      3. Create a field using the AddField method of the SPFieldCollection class. Here you can only set the Display Name. The Internal Name will get autogenerated by SharePoint so you have no control over it. There are rules around what that Internal Name will be and you could write your own routine to figure that out, but that's beyond the scope of this posting.
      4. Create a field using the AddFieldAsXml method of the SPFieldCollection class. Here it's the same thing as the previous method but you specify the CAML for the field (same CAML as you would specify in a SCHEMA.XML file). This has the most flexiblity but also has a bug which is the point of this post.

      The Problem

      So you decide you're going to dynamically update a list using a snippet of CAML and make a call to the AddFieldAsXml method. Let's say your CAML looks something like this:

      string newField = "<Field Type=\"Text\" "DisplayName=\"NewFieldDisplayName\" "Name=\"NewFieldInternalName\"/>";

      So you expect to create a field with a Display Name of "NewFieldDisplayName" and an internal name of "NewFieldInternalName" right? Wrong. After the method call you take a look at the field. Lo and behold, SharePoint has basically ignored your request to make the internal name "NewFieldInternalName" and instead set it to "NewFieldDisplayName". Blech! That's NOT what I asked for.

      The Fix

      The fix is a little two-step that you have to do with SharePoint to get the desired result when using the AddFieldAsXml method:

      1. Define your CAML so that the Internal Name you want to use is actually set as the Display Name
      2. Create the field with the call to AddFieldAsXml
      3. After the field is created, retrieve it using the internal name and set the Title property to the real Display Name you wanted it to be in the first place

      So a simple little snippet to do this would be (this assumes you have some CAML and a SPFieldCollection first):

      /// <summary>

      /// Adds a field as XML to a SharePoint field collection. This fixes the AddFieldAsXml bug SharePoint has.

      /// </summary>

      /// <param name="fields">Field collection to add the new field to.</param>

      private void AddFieldAsXml(SPFieldCollection fields)


          // Declare our intent for our names here

          string internalName = "NewFieldInternalName";

          string displayName = "NewFieldDisplayName";


          // Our definition for the CAML. Note that DisplayName is really our internal name here

          string newField = "<Field Type=\"Text\" DisplayName=\"NewFieldInternalName\" Name=\"NewFieldInternalName\"/>";


          // Call the SharePoint method to create the field.



          // Retrieve the newly created field using the internal name

          SPField field = fields[internalName];


          // Reset the title to the name we want it to be (after AddFieldAsXml the display name will be the internal name)

          field.Title = displayName;


          // Finally commit the updates to the field



      Feel free to use this and update it (maybe passing in the field names or even put it into a class). Hope that helps. Many thanks to Brian on our team for coming up with a solution.



    • ReSharper for Visual Studio 2005

      I'm all for blogging about blogs that blog about blogs just so I can get in a blog post. Got that? So via Roy Osherove and his blog about ReSharper, the public beta is out for you to try it with Visual Studio 2005. Roy's blog came via a post by Peter Provost. Anyways, go get the new version here. ReSharper Rocks!

      Update: According to Steve Eichert he uninstalled it until a more stable version comes along. YMMV.

    • Opening Files in Their Native Programs With SharePoint

      When you click on a file in a SharePoint document library, it launches the file. Most often you'll be prompted as to what you want to do with the file (Open, Save, etc.). In some cases (like Office documents) it will open the file but the program that is doing the client side work on it, renders it in the browser. How many times have you clicked on a Word document and have it launch in the browser so you're looking at IE with an embedded Word control rendering your document. Half the time the user doesn't know what happened and when they close the browser the site is gone when really they wanted to hit the Back button to get back to their doclib. How frustrating.

      Unfortunately the answer isn't an easy one, at least if you have a large deployment of users you need this to happen with. It involves setting up a property with the associated file. The setting is in the web browser, not SharePoint. The technique varies based on different environments (version of browser, version of OS, version of Office) so there’s no golden rule but the default is generally to browse in the same window (at least it has been for me on all the setups I've seen) so it will open up inside of the IE when you're accessing it through your browser. This has the effect of embedding the Microsoft Word control in the browser and hence the problem. Here’s the instructions for reconfiguring the file association in XP:

      1. Go to Explorer (not Internet Explorer) (or My Computer)
      2. Under the Tools menu choose Folder Options
      3. Click on the File Types tab
      4. Find the file extension you want to modify (say DOC for Microsoft Word Document)
      5. Click on the Advanced Button
      6. In the Edit File Type deselect “Browse in same window” for the Edit or Open actions (or all of them if you prefer)

      Here's a screenie of what you should see:

      This will force it to launch a new (Word) window no matter where the source of the document comes from (say a doclib in a browser). I'm pretty sure there’s a blog out on this that someone wrote but can’t find it so hence this posting (feel free to link to it in the comments if someone knows of one).

      Note that there are some files that doesn't work (TXT and XML files for example). For those you may use something like the example that comes with SharePad, a GotDotNet Community Project, however it will take more than a second configuring a machine to get this to work. Also if you need to deploy this, I don't know if it's something you can include in a GPO or not so check with your network guys.

    • Pumped up for PDC and still 9 weeks to go

      September is going to be a busy month. I'm all pumped up for PDC and spent an hour or so screwing around on getting my flights and hotel and all that jazz setup. While I was booking PDC, the MVP Global Summit was 2 weeks after it so I figured I would snag my flights for that as well. At the end it was happy pills for Bil staring at my completed itinerary for the trips. Okay, so maybe you don't get so excited booking a trip but I've been locked up on a project for the last 7 months barely seeing the light of day so taking a week to geek out in L.A. is just plain refreshing. I'm staying at the Miyako Hotel, a cool looking Japanese hotel that offers shiatsu treatment rooms among other things (and free complimentary high-speed internet which is a must so I can blog madly about the events). I also decided to hang around for the Saturday after the conference so I could soak in the L.A. gang wars and whatever else is going on so if you want to hook up let me know.

      Fitz came back from the dead after being busy for a month or so and slams in with a note on Windows SharePoint Services and SQL Server 2005, Reading between the lines for the PDC Sessions, and a product called Longitude (which not only sounds cool but is great than we'll hopefully see some more documentation from the SPS Search team).

    • A Poor Man's Google for SharePoint

      Snapped this up from one of the SharePoint mailing lists. It's a super cheap way to get a Google search on your site:

      1. Navigate to C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE
      2. Create a new folder called "external"
      3. Inside the folder create a single HTML page with the following contents:

        <FORM method=GET action=""
        <A HREF="" target="blank">
        <IMG SRC="" border="0"
        <INPUT TYPE=text name=q size=30 maxlength=255 value="">
        <INPUT type=submit name=btnG VALUE="Google Search" style="font-
      4. Save the file as "google.htm"
      5. Next drop a Page Viewer Web Part onto your page and point it to the page you created. The url to the page will be http://servername/layouts/external/google.htm

      Simple, easy, fast, and free. No web part installations required. If you want something more sophisticated you can check out Mark Wagner's real Google Web Part (with full source code) here.

      Thanks to Chris Dimarco for the information above.

    • SharePoint with Flickr

      I'm getting more and more impressed with Flickr, an online photo managment system, no only with the service itself but more so what people are doing with it. Roy Osherove pointed me to a service that a photographer named kaster created. You input a line of text and spell anything you want using Flickr images. Of course I had to do the obvious:

      SPusAriron e up closePONeon I, SeattleSegmentT

      It does stir up some ideas in my head around enhancing the photo library templates in SharePoint to be more like a Flickr type interface. Better to use from a gallery perspective and you could be able to serve up images through web services, have Web Parts feed off images (like the example above). Lots of potential. Who says SharePoint is just for documents?

      Check out the Flickr mod here and start creating your own unique banners or something with it.

    • Tread carefully when using ReadOnly="TRUE"

      SharePoint list definitions (found in SCHEMA.XML) have a nice feature in that you can mark a field as read-only. Just add ReadOnly="TRUE" to your field definition and the end-user will not be able to edit or change it. This is very much like a calculated field which is also read-only but a read-only field allows you to set it. Of course you'll need a way to set it so some custom code is needed but it's a great use of a status field or something through a little C# where you don't want the user changing it (even if they have FrontPage and are site admins).

      However adding the ReadOnly attribute also has it's drawbacks. You will not be able to see this field in the UI unless you specifically add it to a view. Adding the ShowInEditForm="TRUE" attribute doesn't do what you might think it would. It's there to force the rendering of fields to the edit form. Any average person would think that once you do this, voila, the field will now show up on the form and since it's read-only you'll get a display of it that nobody can edit right? Wrong. There's no way that I can concievably find that will show a field on either the new form (when adding and item/document) or the edit form. I tried the Viewable="TRUE" attribute but that didn't work either. You can use it on views as it's available there but for forms it just doesn't show up.

      Inversely if you add the attribute Hidden="TRUE" to your field definition you'll never see it. Handy for storing stuff in lists that you don't want anyone to get at, but if just remember it's there as it won't show up normally.

    • Wrong or Right, it's all over the frickin' place

      While looking through my referrals (yeah, I need a life) I found one from Computerworld which was odd because I had never blogged there nor did anyone that I (normally) know did that linked to my posts. It Seems Mikes article keeps making its rounds and this time ended up in a mish-mash article that lumped "Dell clueless, SharePoint annoying, and Longhorn teaseful" all together. Nice.

      What's wrong with Sharepoint? Long-time Microsoft consultant Mike Drips tells us. Paul Schaeflein rebuts some points and later summarizes other posts. MS blogger Robert Scoble responds, adding his own list. IBM blogger Ed Brill finds the blog responses from the MS community "interesting." Canadian MVP Bill Simser has his own take. Ferris Research is looking for your opinions and offering a nice bribe inducement.

      Now if we could just generate as much energy over helping understand and make the product better the world might be an easier place to live.

      P.S. Can't anyone ever spell my first name right? I know it's odd but is too much to ask?

    • Get your butt to PDC

      Registered last night for PDC (to make the early bird cutoff and save $300). You have until this Friday to cash in on the savings, otherwise you'll pay the full price of $1995USD. Hope to see various bloggers, MVPs, Micrsoquishy guys, and anyone else there. Now I need a good Wi-Fi notebook to take with me to capture notes and do some blogging during the 5 day conference. I've been looking at Motion Computings LS800 as it's smaller than a laptop but bigger than a PDA, but then Alienwares Area-51m 7700 looks too sweet to not get. Let me know what you guys think. The big thing of course is all the new SharePoint stuff as Microsoft will be letting loose and not holding anything back on the next release for SharePoint as well as Office 12 (or whatever it will be called). So get your butt to PDC and see you there!

    • Oh bother

      Okay, Saturday was a bad day for me and after reading Ed Brill's blog on the whole Mike Drips article (and my response which he quoted a few times) I decided to delete the post. It's the first time I've done that and I normally wouldn't but in reality the post was my emotions getting the better of me and taking it out more against Mike than the content of his post. Daniel McPherson makes some good comments about getting to the bottom of "what's wrong" with SharePoint and ways that the team can fix it. I think we all agree there are things wrong with SharePoint but it's not a bucket of bolts that has no purpose or value. It's just articles that are primarily negative seem to cast a shadow so people new to the scene might not get both sides of the story (hence why I'm leaving my Five Things Right With SharePoint post). So back to being the kinder and more gentler SharePoint guy that I should be.

    • Five Things Right With SharePoint

      While Mr. Drips got his shots in (and I did my own share of mudslinging) I thought I would take the time to come out with my own spin on this and present the five things right with SharePoint. Feel free to agree or disagree with me, add your own, or go have a protein shake.

      1. Quick and Easy Creation and Collaboration

      This is probably one of SharePoints biggest features and the easiest to use. Want to get some teams that are geographically disjointed, can't rely on email for communications, and don't have time to set meetings up with everyone? A team site is just what is needed and brings everyone together in a quick and easy way. Where else can you offload site creation with a self-driven service and yet still monitor and be able to throttle users on how much storage they take up (or remind people about inactive sites for those that were just "playing").

      Far too many people shun SharePoint because it doesn't do this or that out of the box and expect much more. If you take a step back and look at what you have and not what you don't, you'll find a vast set of resources that can be used for not only simple collaborative team sites but help desks, knowledge bases, employee performance tracking, wikis, blogs, and much much more. While there are physical limitations on implementations, the sky is the limit on your imagination.

      2. .NET and Web Services

      Let's face it, building business solutions is tough no matter what technology is out there. For the most part though, business solutions are really quite easy. Really. Their hasn't been a complex business problem that I've seen yet. Complicated perhaps. Many moving parts maybe. But actually complex, not so much. When you can start leveraging things like SSO and talking to infrastructure services that don't require complex data models to keep track of simple things, SharePoint just works. Add to that the fact that most of the major large vendors out there (Seibel, SAP, etc.) are giving away Web Parts for your sites to talk to their products.

      No longer do I have to hand bomb some crazy ass service to connect to my Enterprise systems. I have extensibility and expandability. With more and more people out there writing .NET components, Web Parts are naturally springing up to solve various problems and fill some gaps people have been wanting the product to do (like RSS feeds). I can now tie my sites into Enterprise tools with minimal effort, attach to pre-built accelerators that provide a piece of functionality, and custom build systems that suite my specific business needs. All from one interface delivered, managed, and secured through the web. That's not so bad.

      3. Integration with Office and other Microsoft Products

      Open a Microsoft Word document from your hard drive and you'll get the usual gammet of features. Open one from a SharePoint site and you'll have a vast amount of new things that will not only help increase your productivity and put you in touch with teams but it will also give you new things like presence and status. Click on a user column and I can now access my colleagues calendars, availability, and contact information. The fact that the mere presence of a product in my environment and that it changes the behavior of other products is pretty interesting, but I can also leverage this and rather than building custom chat tools or deal with the inadequacies of web editing, just let them use Word. Complete with custom properties I can build views and groupings of documents that should drive people away from the archaic file systems folder heirarchy where I can't group things by two different values.

      Throw on top of that a workflow engine out of BizTalk and sophisticated data entry via InfoPath forms (all stored in SharePoint) and I can start building things like automated recruiting systems that get me away from the crazy email and phone based solutions (or custom built systems) just to ensure a new hire has a computer. This can be looked at as an early incarnation if you will of Software Factories in action but stay tuned as it can only get better.

      4. Microsoft's commitment to evolving an ongoing suite of tools

      Microsoft has made it clear that SharePoint is a key player in the Office space and the tool to enable you to deliver collaborative solutions. Let's face it, Office has been pretty stagnant since it's inception. What great new features have you seen in Microsoft Word in the past 10 years? Collaboration and productivity is becoming the core of the Office Suite now as you just can't get any better with a word processor or a spreadsheet.

      SharePoint 2003 was a test-bed for creating the next generation Web Sites and you see this in .NET 2.0 with the Web Part framework being expanded out and SharePoint and .NET 2.0 coming together. This isn't a half-baked idea that just evolved into something large and unruly, these are ideas and concepts that stretch back to the early days and now come full circle to provide a platform rather than a tool or technology. If you think SQL Server is just a database, you probably think SharePoint is just a web site. It's that and much more and Microsoft is behind this for the long run.

      5. The SharePoint Community

      While I go on and rave about how great this platform is, it does have it's shortcomings. However there are a lot of resources out there. Looking back to when we had SharePoint 2001 and the 5 of us that blogged about it, we now have over 100 dedicated people that are always writing about new things they're discovering, answering questions, and creating new tools. Go on. Go out and ask.

      More often than not, the problem has already been solved and someone is more than willing to share. If not, it becomes a challenge for those of us that wish to take up the gauntlet. The SharePoint community is quite large and grows each day but it is a community and a two-way street. A street that you can either play on or help pave. I for one welcome our new portal overlords, you should too.

    • PDC all the way baby...

      PDC is the bomb and I'm excited to be able to go this year. Yes, even more excited than TechEd which I didn't get to go to and whined about it for many posts. Like a good whine wine (or woman for that part) the best part of PDC is waiting in anticipation for it. Channel 9 has their PDC contest going strong for another month so see my auto-magic post below. I think I'm doing pretty good on standings so far. Last time I checked (a couple of days ago) I was in the one of the top 3 or 4.

      Me: 72
      Steve Hebert (smarter dude than me): 85
      Roy Osherove (another smarter dude than me): 80

      Not bad for the portal guy who whines wines a lot. Of course this is just on referrals alone and we all know its also about content and not just clicks (feel free to use that sometime as it has a nice ring to it). In any case, here's another pathetic plea for you to send a geek to Los Angeles for a week of debugging and debauchery.

      Hmmm, update. I just checked the PDC05 Contest Sightings page and found that Steve Hebert is WAAAAAAY out front now with 164. Also a bunch of others have crept up in the last few days leaving me back down in the dust. Guess everyone found Steve's blog and hey, why not vote for the smarter dude. Anyways, maybe the SharePoint community will take pity on me and help an old portal guy out. Here's the updated standings (counting all referrals):

      Me: 102
      Steve Hebert: 164
      Roy Osherove: 92

      This time I'm using Brendan Tompkins most excellent Web Service to write my entry. Brendan took it upon himself to be creative on his entry and think outside of the box. Rather than writing some funny or provocative or even useful (like Roy Osherove who posted his RegEx blog and then decided to give a fine tutorial on Regular Expressions to boot) Brendan built a Web Service that you can call to create the blog entry for you. I was one of the first ones to try it out and it's great. Brendan personally has my vote to go. Anyways, check out his service if you want your own blog entry and join the club. Simply brilliant.

      Here's what you need to quickly bang something together and get the results delivered to you in a string:

      private void Form1_Load(object sender, System.EventArgs e)


          EntryServiceRequest request = new EntryServiceRequest();

          request.BlogUrl = "";

          request.FirstName = "Bil";

          request.LastName = "Simser";

          request.Interests = ".NET, C#, ASP.NET, SharePoint, Agile, DDD, TDD";


          PDCContestEntryService service = new PDCContestEntryService();

          EntryServiceResponse response = service.CreateBlogPostEntry(request);


          textBox1.Text = response.PostBody;


      Then just cut and paste the results (from response.PostBody) into your blog. Mine follows below. Guess I need to get a little more worldly as far as Amazon is concerned. And hey, while you're scrolling down the page feel free to click on the bloggie icon and bump up my counter. Yeah, I need to take as many cheap shots as I can as we get into the home stretch, this won't be the last grovelling from me on this.

      You really don't want me whining for another week about how I couldn't go and if I do win, you'll get my lovely blow-by-blow commentary on all things SharePoint and .NET 2.0 that I stumble over and after a few drinks we'll kick up a live demonstration of Whack-A-Fitz.

      I’m Blog’n my way to the PDC!

      If you haven’t heard, Channel9 has started a contest where you can win a ticket to the PDC, including an airline ticket and hotel!  This is one amazing contest, and all you have to do to enter is have a blog, and post why you should win the prize.  So here’s my official entry:

      blogging my way to pdc

      Here's some information to help you get to know me better:

      Why me?

      Why do I want to go to the PDC? Because I love to blog! And I'm prolific! Here's some of my more popular blog posts links according to Google :

    • SharePoint Version Bug
    • Fear and Loathing
    • SPS Customization
    • Syncronization of Office Document Properties with WSS Document ...
    • Adjusting the DisplaySize of your Fields

        What are my interests?

         Well, here’s a list of books that I'll probably be reading on the plane to LAX :

        I'm not very interesting according to Amazon.

          Did I type up all this ugly HTML for this Blog post myself?

          Heck no!  I’m lazy!  But that’s exactly why I need to go to PDC!  The PDC is all about the future, and in the future, we’ll all be using cool technology to do things like typing tedious, boring contest entries.  I’m getting a head start on the salad days, so I figured out how to use ASMX web service that Brendan wrote! To prove it, you can see that I'm on this list of other, lazy coders who would rather sit back and use a distributed Web Service to do their work!  

        • A good reporting solution for SharePoint Applications?

          Hope everyone had a good holiday. I know the Americans did the big fireworks display for the 4th and as usual, in Canada, we had two guys in a fishing boat with a flare gun.

          I've been looking at reporting solutions in SharePoint, specifically building reporting around data kept in SharePoint itself and not necessarily reporting on SharePoint but more business-specific reporting. On the SharePoint reporting side, there are a lot of great options like the recently released SQL Server Report Pack. That's great if you're looking at reporting on how SharePoint itself is doing, the site collections, how many documents are in each site, etc. but what if you want to know how well sales are doing when you store the sales figures in a SharePoint list?

          If you build a business application using SharePoint and store the business information in SharePoint lists then getting the information out is like pulling teeth. All reporting tools (Crystal, BusinessObjects, SQL, etc.) need a datasource for the information. None of them can use SharePoint lists as a datasource. The closest you can get is using the SharePoint List Web Service to get the information out, but even then it's not very good either. So far the solution I'm going down is using a .NET managed reporting tool (ActiveReports for .NET from Data Dynamics) and just creating an XML datasource that represents my business objects (mostly through serialization in my business layer which isn't the best). Just wondering if anyone has any other solutions for this type of problem?

        • Control Injection for SharePoint Web Parts

          This week has been pretty busy so I haven't even got to my blog backlog as well it was a bit of a living hell for me as we were experiencing various problems with a few common components that provide mail which in turn required us to do a quick "comment out" code release to demo a product. Anyways, now that that's over and it's July 1st (Canada Day, much like Independance Day that Americans will celebrate on the 4th but without the aliens).

          I was on one of my more favorite geek sites, The Code Project, and found an interesting article that resonated with the SharePoint side of my brain. The author wasn't too happy with the lack of design support for building ASP.NET server controls (as are all of us that write Web Parts) and came up with an interesting solution to the problem. He uses an approach similar to string.Format to inject controls into a composite control layout string. After a couple of iterations he then took the HTML page for his composite control and made it an embedded resource in his server control and this became the layout string to inject the controls into.

          The same principle can be easily applied to Web Parts. Just create a new embedded resource which is your HTML layout then in your CreateChildControls call, create the controls and inject them using the layout file. It still has it's drawbacks so something like SmartPart and User Controls give you the design-time capabilities that this doesn't offer, but it's a good alternative if you're struggling writing out gobs of HTML in your codebase and doesn't require deployment of .ascx pages or anything. Check out the Code Project article here.

        • The Collective vs. the Individual

          Is it that difficult to get along and agree to an idea? Probably not. What the hell am I talking about? The SharePoint community of course. No, there's no rebellion going on with some twisted and evil Sith Lord reigning supreme and the rest of us are just battling it out in the trenches, waiting for some rebel group to topple the regime and take down the Emperor. Oh, sorry. Had something on my mind. Okay, I'm back now.

          A while ago I threw an idea out (I think it was through the newsgroups, which I've horribly been vacant from but will return shortly). The idea was that we (i.e. the more active SharePoint we) should put together a central resource for all stuff being SharePoint. Recently I've seen a lot of updates to tool lists, resource lists, lists of bloggers, you know, the usual. It seems like everybody and his brother have a list of bloggers, there are several (very good) lists of tools and resources, and almost everyone who's anyone will have a page of SharePoint resources with links to various places on the net.

          I guess I'm just somewhat astonished at how difficult it is to get information sometimes. I mean, Google is my friend and the first place I turn to to find something if I don't have it on the top of my brain (and it's really embarassing when you google for an answer only to find your own blog entry to have it). However I just keep stumbling over multiple resources for the same thing. Is this a good thing? Maybe. The problem is that if I put my SharePoint newbie hat on and try to find info I sometimes can't see the forest for the trees. I looked at a few of the SharePoint blogger lists out there. Great resources but they're all individuals view of the world. Some have most of the MVPs, some don't; some have links to some really smart dudes, others don't. Again, a great resource but it's hit and miss for anyone looking for the best set of information.

          Given that SharePoint is all about collaboration I just get torqued over the fact that we, as a community, can't do the same. I don't know why we can't agree to a single resource location so that a) it's consistent b) it's as complete as it can be and c) it's organic and not someone's page that unfortunately hasn't been updated because they don't have time or forgot they even had it. I believe the collective view of the SharePointVerse is a better thing, in any dimension, than one mans (or womans).

          It's a pretty simple concept. An open system that follows the following principles:

          1. Anyone and everyone can contribute to it. Sure there needs to be a group of people that keep an eye out for dupes, malicious posts or spam but that can anyone with some time and passion.
          2. If you contribute something you should be responsible to keep it up to date. Like a good boy scout, clean up after yourself. 
          3. If you see something out of date, update it.
          4. If anyone asks about something that would be on the list (where can I find a list of SharePoint bloggers which gets asked a lot) you point them at the list. If it's not on the (and you know the answer) that would be a trigger to add it.

          Doesn't seem that difficult however there were a few hurdles that never got this idea off the ground. First, nobody wanted it hosted by a single person (i.e. it shouldn't be say a site Bil runs, or Mike, or Patrick, or whomever). Second, nobody could seem to agree that a single resource is the right thing. Anyways, it may not be the "right" thing but in my meager mind, it's the correct thing.

        • Followup on SharePoint Versioning

          Thanks to some fellow MVPs and co. I got more information on the whole versioning thing. As mentioned, Serge van den Oever posted a blog about it (being one of his bigger griped about versioned libraries). I spent the better part of yesterday morning with Microsoft going over it, trying out a dozen or so test scenarios and trying to come to a pretty complete understanding on what was happening and what it meant.

          When your add a document to a versioned document library in SharePoint, the document is put into the SQL database and various bits of information are set (created date, modified date, etc.). When the next version of that document comes along, the current one (which is the one you address via the url that you might send out to people) is moved into a virtual folder (under a vtihistory directory) and the new copy is setup to replace the previous one (as far as addressing the file through a url is concerned).

          The problem however basically breaks down to this. Using checkin/checkout will trigger a change in updating a previous version. The change isn't the content, just that move that happens when the current version is copied down into the vtihistory directory. If you simply upload the file (or save it directly using your Office 2003 client), then a new version is generated but the previous version's time and date stamp is left intact. It seems there's two paths here. One will update your previous versions timestamp, the other won't. I suspect (but haven't dug in deep enough with Reflector to see what's going on) that they're taking two different calls to do this (something like the difference between Copy and Move in a document library where one will copy the history and other doesn't).

          Yeah, bugs the crap out of me. I'm currently working on a Contract Management System built in SharePoint so we're dealing with many versions of legal documents and the business user needs to know who modified what and when. We've been pushing them to use the checkout/edit/checkin cycle but now it looks like that might change as we can no longer tell the when part.

          There was a recommendation by Dustin Miller to build an event handler for the library to get around this. That's great if you only have one handler and don't want to use 3rd party tools like Nintex's doclibs as there's a one handler per doclib restriction in effect. There is a new TODO on my very large list of SharePoint goodies to cook up now. An Event Handler Factory is needed for SharePoint that can invoke other event handlers or chain event handlers together. Seems like a fun thing to do (but feel free to build one yourself if you're so inclined).

        • SharePoint Version Bug

          Okay, now I'm pretty convinced that this is a bug or that I'm a complete idiot, one of the two. I'm working with our SharePoint infrastructure provider and Microsoft support on this, but at this point I have to call "bug" on this as I can faithfully reproduce it on as many SharePoint instances we have here (9) some of which were setup by me, others were setup by our provider. So either we're all doing it wrong or something is rotten in Calgary.

          Create a document library, enable versioning and let's have some fun. First upload a document. The creation date and modified date will be current and the same. All is good and well. Now check out said document, do some editing (or not, doesn't matter) and check it back in.

          Something happens. Something magical. Here's the document library before the update:

          Now here it is after a few versions and specifically after a checkout/checkin.

          Am I completely off my rocker or did anyone notice what happened?

          Version 3 (before the update) had a modified timestamp of 6/14/2005 @ 3:52 PM. This is correct as I had checked that version in at that time. Now comes along big, bad Version 4. Version 4 is checked in at 6/22/2005 @ 4:33 AM and magically SharePoint has decided to modify something in Version 3 thus marking the timestamp for it as 1 minute before Version 4.

          Sorry, that's just not right. Checking in Version 4 should not modify Version 3.

          Let's see what we have here:

          • Checking in Version 2 of a document causes Version 1 to lose it's original modified date
          • Checking in Version N of a document causes Version N - 1 to have a new Modified date of Version N's Modified date minus 1 minute

          Note that the Created date is always left alone but you can only get this by looking at the properties (or creating a view with it in it). This is fine except if you're relying on Version history for audit purposes (like SOX compliancy) then you're kinda screwed.

          Of course YMMV but I keep finding this on all our SharePoint instances. I did find on Google someone who was experiencing this as well but didn't get any answer. Let me know if you can reproduce this as I don't feel it's how versioning should work.

          Addendum: Okay, I'll concede (after a few comments from the community) that this is by "design" and not necessarily a bug. However this isn't the last of this as I don't believe in the "point of view" argument. Stay tuned tommorow for more.

        • Scott Hanselman is my hero

          Scott Hanselman is, hands down, simply my hero today. A couple of years ago he posted a pretty massive list of useful tools, utilities, and must have stuff a any self-respecting geek should have on his hard drive. Now he's updated the list and it's massive (and broken down into catagories to boot). I find that I use about 1/2 of the tools listed and now I'm off to investigate the other half. If there's one blog entry you need to bookmark, clip, or copy and paste into OneNote (if that's your thing) this is it. Check out his 2005 updated list here. Everyone else is.

          Here's my personal top 10 from his list (plus some that are not there) that I faithfully use every day:

          • ReSharper - Basically live and die by this. I can do all the refactorings by hand, but it's just so sweet to rename a class and have 30 files update automatically.
          • WinMerge - Fantastic util and very handy for trying to diff SharePoint xml files between environments. Open source to boot.
          • NAnt - Build, build, build (and do a whole lot more)
          • TestDriven.Net - Test, test, test (and then refactor and test some more)
          • OneNote - I clip tons of stuff everyday. It's from my old days as a graphic artist where I would clip pictures and put them in what's called a "graveyard". OneNote lets me do this, search it, organize and much more. I also keep a OneNote section on blog ideas and whatnot. Very handy!
          • Notepad++ - Scott pushes Notepad2, but I prefer this Notepad replacement. YMMV.
          • Midnight Commander - Scott doesn't have this listed so call me a command line guy, but I prefer this util over Explorer anyday. Reminds me of the odl XTree tool (which I used all the time as well)
          • CopySourceAsHtml - Great for blog postings!
          • Reflector - I'm poking inside Microsofts assemblies everyday trying to see what makes things tick.
          • Web Services Studio 2.0 - This is an invaluable tool when trying to debug Web Services from SharePoint. Get it now!

        • Moving to 2.0 and other goodness

          What a week of living H-E-double-hockey-sticks as I've had about 10 hours of sleep for the entire week (which is a bit low even for me) and basically got very little done. Two things that I wanted to mention though.

          Yesterday I had the pleasure of working with Kit George, the Program Manager for the CLR team at Microsoft. The CLR team was in Calgary these past few days (and have been in Canada for the past week) helping out customers with some compatibility testing with the 2.0 framework. It was great talking to Kit and found a few intersting facts out I didn't know. There are about 66 developers on the CLR team alone which gives you a real idea of how big the entire team is (so add on project/program managers, architects, testers, etc.). Oh yeah, and if you're looking forward to the GZipStream class coming in System.IO.Compression like I am (goodbye SharpZipLib!), you can thank Kit. That's his baby.

          If you're looking for a migration path then I suggest you install the framework. Really. Just install it. You can get the redist here which, like it's 1.1 cousin, is just a single 20mb setup.exe that you run. Install it on a development server and in your Web Site properties in IIS just retarget it for 2.0. No iisreset needed. No reboot required. Your 1.1 ASP.NET apps should work fine (they'll be a short JIT when someone accesses them for the first time). We only did a small test (3 or 4 apps) but the 30 or so others running on that server didn't show any issues and nobody reported any problems. Try it out for awhile like that. Then you can think about the recompiling of apps, which is a different issue than just retargeting for the platform. The retargeting and installation of the 2.0 framework is pretty simple. We did find a silly problem sometimes because the ViewState was cached, so just relaunch your browser to fix it. This was when we were in the middle of a task, retargeted the system, then just tried carrying on from there. Not something you would normally do. If you do deploy and try testing but still find any issues you might want to drop a note off to Kit and his team.

          If you're looking to recompile (and you will at some point) then you'll need of course Visual Studio and all that jazz. While the retargeting is simple and the team says it'll probably work fine 99% of the time (there will be those off things that are exceptions, again if you come across them let Microsoft know!) it's the recompiling that's going to bite you. I've been recompiling apps here at work from time to time (what else does a geek like me do on his lunchbreak?) to see what kind of issues there are (not testing the apps, just recompiling the solutions) and there are some deprecated things that you'll need to rework your code at some point (one of the biggest ones is system.configuration). The other thing is splitting up of assemblies. Let's say you have a common assembly for logging or something that 10 ASP.NET apps use. You can't be expected to upgrade all 10 apps at the same time as the testing effort might be too much to bear. So you'll be in a mixed mode scenario where your environment might be targetted for 2.0 and a few of the apps are native 2.0 (migrated and recompiled) but others (like common assemblies) are still 1.1. This is the scenario that needs the most testing and you'll probably stumble over issues (DateTime serialization being one of the biggest ones). So just something to watch out for and that there's going to be some work migrating to 2.0.

          Finally Serge posted a great example in the comments from Thursdays post of how he accesses the SQL directly for retrieving things from a command line (via bcp but you can do it with osql as well). He did say that he tried my Wrapper classes but they didn't provide enough depth of functionality and were a bit of work. This resonates with me that I need to shift a bunch of focus on the library and make it useful instead of a bit of a toy which is what it kind of is right now. If I'm going to go around preaching for people to write remote apps I feel that I should provide you with an easy to use and rich tool to do this. So I will be getting back to putting more time into the wrappers and hopefully provide a complete set of objects that anyone can use for any purpose. Web Services are still slower than the Object Model but the advantage is that you don't have to run it directly on the server and some caching might be able to speed things up a bit. I think it'll be a long time before Microsoft does something like make the SharePoint object model remotable (if ever) so hopefully this will help in the meantime.

        • Please stop using the database and start writing remote apps

          As I get down off my soapbox from yesterday about overpriced third-party SharePoint tools and components I have a new gripe (seems like a good week for this). Time and time again I'm seeing two things become apparent in tools that are coming onto the market. First, some are just bypassing the rules of the road and doing stuff directly against the SQL databases. Second, about 9 out of 10 tools must be run directly on the server and require a local administrator.

          Okay, first on the SQL stuff. I don't understand why developers can't get over this. You've seen numerous posts (including Fitz going on a few times about it) to get out of the database. So why do you keep doing it? My only reasoning is that you're frustrated by the lack of access to things that we think should be apparant and well, we can all write T-SQL so why not talk to it directly? What's the harm? I'm not going to get into the issues of what the database is doing as Fitz had a good explaination around that. Maybe that position should change though as more and more products are just blatently going against the database to do things like counting the number of sites in a portal. Rather than looping through a property in the Object Model, a quick "SELECT COUNT(1) FROM WEBS" will do the trick. So the $10,000 question might be should we be doing this? If you're using the database directly can you do simple selects, counts, etc. as long as you're not doing updates?

          Second is the ever growing number of tools that keep requiring two things. One to be run directly on the server and two to be run by a local administrator. It's great for some tools because they are administrator tools, but I think the one big thing with SharePoint that people are having trouble with is the admisistration. More and more companies are either outsourcing their infrastructure or trying to get everyone to do their jobs from a single location. At our company, a huge effort just finished on stopping the free love access that users had to systems. The other thing is that a SharePoint administrator shouldn't have to have local admin to the SharePoint box. In a clustered or scaled out scenario, that means they really need access to several boxes (including the database servers). I think what we need is more tools that users can use off their desktop (via Web Services) to do the mundane stuff that SharePoint doesn't necessarily expose through the Web UI, or for custom tasks that are specific to your business needs. Again, we're given lots of tools but most of them we might be in a position to not be able to use in our environment due to restrictions on our infrastructure. I don't think the answer is to keep opening up the infrastructure to allow a SharePoint admin local root power but that's just me.


        • A feeling of Deja Vu

          A long time ago in a technology far, far, away I used to write these things called Doors that ran on community-based, dial-up, text-based systems called BBSes (yes, before the big bad "Internet"). A BBS was like a website (but not really) where communities got together, posted messages, swaped files and email and played games (sounds like a website huh?). Doors were all the rage and I ran many systems and wrote a bunch of Door games and all was well in the universe.

          Along game a man named Tim Stryker who was a bit of a radical, but basically a genius. He (and others) put together a system called MajorBBS (MBBS for short). This was a unique system over traditional BBS systems of the time because rather than spawning off separate processes to run all these Door games available, MBBS would run them as Dynamic Link Librairies (DLLs) and all modules in a system would run in real-time (at first they were actually linked into the system and you had to recompile the system when you bought a new module, crazy huh?). Things like real-time chatting, real-time updates from people playing in games, were now possible with the approach and technology Mr. Stryker and Galacticomm built.

          However here's the catch. Building a regular (non-MBBS) Door game was pretty much a no-brainer for a good programmer. There were some frameworks out there that handled the Serial IO for you (remember this is all dial-up, async, 2400 baud and all that) but for the most part you wrote a single player application and only worried about it while it was running. The Door would launch, the user would play, the executable would end and the user was shuffled back to the BBS system from whence he (or she) came. Then Major BBS modules appeared but there was a bit of a catch on building these as you had to now deal with shared memory, be wary of heavy processing and not taking down all the other lines (up to 255 on a single PC!) and stuff like that. Additionally you had to outfit yourself with some pretty specialized tools. Borland C was the only compiler you could use (later Microsoft Visual C was able to do the job), a special memory extender library (PharLap) had to be used, etc.

          On top of all that, you also had to buy your MBBS system just to test your code. All in all, I personally invested about $2000-$3000 bucks to build my development environment which was a lot for back then. To offset this, Major BBS developers could charge an arm and leg for their products. Even a simple game like Tic-Tac-Toe (with a chat feature) would sell for hundreds of dollars. I built small RPG games that I sold for over $1000. That's each. And you could get away with selling licenses for more lines. The more lines (users) a BBS wanted, the more your could charge. The short of it was that we could get away with this because it was difficult to build the software, an investment for the environment, and then there was support and the fact that any guy off the street couldn't just sit down one night and say "I'm going to build a MBBS module and make a boatload of cash". A Door developer on the other hand could knock off a pretty decent game in a few days/weeks and sell it for $20 a pop and laugh all the way to the bank.

          There are parallels with BBS Door Development that can be done on a shoestring and say writing ASP.NET web apps using free tools today. I can download the .NET SDK for free and compile my system. Web Matrix isn't a bad tool. I can deploy or sell my web solution or I could build .NET client applications using something like SharpDevelop. In other words, I can build the Doors of yesterday today with .NET and some cheap (free) tools. With Web Parts and SharePoint the experience is very much like what we went through with Major BBS development. You need a specialized environment (Windows Server 2003). You need a specific IDE (Visual Studio .NET although you might be able to use something like SharpDevelop). You need to develop right on the server or else put up with very complicated ways of remote debugging (trust me, debugging with PharLap and protected memory dumps was no picnic either). You need to know a lot of about how SharePoint works, what works (and what doesn't) and how to twist it to do your bidding. Development in SharePoint is not a walk in the park and can be expensive to setup and work with.

          Why am I telling you all this? I'm seeing the MBBS trend happen again but this time in the SharePoint space. No, people are not writing Door games for SharePoint (although that does entice my already overtaxed project list). There are however lots of niche products coming out and while some are great, some not so great, they're (for the most part) expensive. I'm also not talking about expensive as in comparing them to 1980s prices or through inflation but just the fact that a small widget (or set of widgets) that does something useful (say backup files, deploys changes to your SharePoint sites, provides better than basic workflow, etc.) is pretty costly for what it does.

          Don't get me wrong. I'm all for free enterprise and making money however I just look across the SharePoint tool and Web Part space and feel a little deja vu coming on. Again, there is an investment here and a return that companies want to see on that investment. However it just feels costly for a few Web Parts. Maybe it's me, maybe times have changed, but is it really worth thousands of dollars to a company to purchase an out of the box Recycle Bin for SharePoint? Sure there are free tools and low(er) cost Tools, Web Parts, and Solutions coming out as well but my gut feel is that when you direct someone to a commercial product more often than not it's going to cost a few bucks to get that tool. I look at just a sampling of a lot of tools and we're talking $5k, $10k, and up for many of them.

          Again, I'm not trying to paint everyone with a single brush and I guess cost is relative and in the grand scheme of things, some companies have that kind of money to invest and don't see it as a large outlay. I just feel like I'm back in 1980 where we, the MBBS developers, could charge 10 times more for a module than a BBS door just because we knew how to build them. I might be alone in my thoughts here but hey, it's my blog and I'll ramble if I want to.

        • Catching up, CTP Madness, and PDC ranking

          I'm playing catch up today as things in the universe are just a little off kilter for me.

          The weekend was a bit of a bust with regards to getting my Remote SharePoint Explorer out as I was bogged down in re-installing (yet again) Windows XP. For the life of me, I couldn't get my SATA drive to boot as the master device so couldn't get my OS moved from a small 40gb drive to where it should have been in the first place, on a nice happy 200gb one. So I had to run out and grab a 200gb IDE which the system would recognize. Then I spent the better part of the day screwing around trying to figure out why it kept complaining that it couldn't find hal.dll (when it was clearly there). Finally I yanked the SATA connection out and all was well. Seems Windows XP got confuzzled over where it was looking for files. At boot time it was talking to my IDE, but then at install time it figured my SATA drive was in charge and thus couldn't continue. Installed XP on the IDE, replugged the SATA drive back in and that was that. Sometime around Sunday night I finally finished setting up Visual Studio for the umpteenth time. You can read the brochures and rally around products like Norton Ghost and Acronis Disk Image, but moving installed programs under Windows around just never works. There are always left over droppings of registry settings, files in common places, and configurations in Documents and Settings that screw up moving anything from drive to drive.

          On top of that, some kind of weird electrical oddity occured in our building at work so Monday was Snow Day for me and we were turned away at the doors (well, the few that didn't read the email on Sunday night saying the building was closed). So I tried getting some work done but just couldn't and ended up killing some brain cells with Halo 2 most of the day.

          Okay, with that out of the way I did find a very cool page on Channel 9 that handles all the grunt work of CTP madness for you. You know, when you try to install a Community Technology Preview of something but end up messing up your environment so badly (thank the maker for Virtual PC) that you don't know what to do. CTP Build Finder is a slick tool that lets you select a product (from the list of all the current CTPs) and it will show you what other CTP products it's compatible with. Very cool and very useful if you're planning to try out something like Indigo and Longhorn at the same time. Check it out here.

          Thanks to everyone who supported me (or felt sorry for me) and clicked on the PDC link. As far as rankings go, I'm tied in first place with 41 referrals (there are three different urls it's tracking, the original one, the original one with a "/" and the archived entry). Of course, referrals are not just the criteria for the contest as they'll be reading the blogs and deciding based on content and all that jazz. My pathetic attempts at humor will of course put me in last place here but hey, it's all fun until someone loses an eye.

          I do have a dilemma with the PDC contest though. The contest ends mid August while the early bird registration ends in July. The early registration will save you $500USD for the conference, which in Canadian money is like $10,000. So if I wait for the contest and lose, I'm costing my company an additional $500USD for the registration. What's a girl to do?

          Finally on a side note, there was an article on Slashdot about the rise and fall of blogs and how it's degraded into a personal rant fest and most people would like all bloggers to curl up and die. This post just contributes to that dribble so enjoy the wasted bandwidth and 2 minutes of your life you took reading this as you're not going to get it back.

        • Send Bil to PDC

          This morning is special. It's special because I'm on my knees to the SharePoint blogging community (and anyone else who stumbled on this blog after googling for "contest"). The good geeks over at Channel 9 are sending some lucky nerd to this years Professional Developers Conference through a simple contest and I want to be that nerd. This blog post is my plea for you to send me to PDC. Why? Why send this lowly MVP to PDC and not say someone else who doesn't gripe about not going to TechEd every day of the event?

          It's not like I'm asking to be sent to Tibet for an all-expense paid vacation as a yak herder. This years PDC is in Los Angeles. No, PDC is no TechEd. It does not have the glitz, the traffic, the smog, the shopping malls or the proximity of Disney World, not to mention a comparable number of television channels. Yet PDC is like the Willy Wonka of IT. With it's hands on experience with the next version of SharePoint (hopefully), in-depth talks on the future of portals, and long all-night drinking sessions that touch on the very nature of Information Technology. How can you not send me there, at least to live vicariously through my blog entries that I'll surely post.

          Think of the precendent if you don't send Bil to PDC. The next time some Fortune 500 mega-conglomerate denies a geeks desire to seek knowledge and share wisdom, the IT organization will be left with no appeal. "Remember Bil" they'll say.

          My promise to the world, should you send me to PDC, is simple.

          • Daily updated photos of what's happening including anything so embarassing it will be blogged about for years to come
          • At least one morning where I'm hung over and have to give a presentation or speak publically and don't come off looking like a complete idiot
          • An in-depth interview in the PDC garage where you provide the questions with someone so close to SharePoint that we can only call him "Deep Throat"
          • A blog-by-blog posting several times throughout the day on the magical goings on and what I step in when it comes to SharePoint, development, and IT
          • A live demonstration of my Whack-A-Fitz concept
          • An answer to the age old question. Boxers or Briefs?

          So please, for the love of all that is managed code, send me to PDC. Click on the link below to do this. Really. Just one click. That's all.

          blogging my way to pdc

        • SharePoint Wrappers, a new tool for you, and more on TechEd that I didn't go to

          No SharePointy stuff today as I'm just spending most of my day re-configuring our VMs so calls to SPUtility.GuessLoginNameFromEmail will work. I do have some goodies coming up this weekend as a server move is going to keep me away from the office so I'm going to be VPCing at home on non-project work and have a few things to post on my SharePoint Wrappers project which provide an OO way to access SharePoint services from remote locations (like desktops). I'll be posting a blog and source update to a new tool called Remote SharePoint Explorer (for lack of a better name) which mimics what SharePoint Explorer from Navigo does, but you can run it from your desktop (doesn't have as much functionality as SharePoint Explorer does, but gets you as close as you can via Web Services). So keep an eye out for that this weekend.

          Fitz resurfaced from drinking and carrying on at TechEd, an event that I was unable to make it to (grumble, grumble, grumble, gripe, gripe, grip) and posted a few notes from the event. He's got a nice little block on Navigo Systems that have a solution for boolean type searches and, as Fitz puts it, is a much more powerful and flexible search option that can be a drop-in replacement for the standard search. Also check out SharePad and the FrontPage RPC stuff that the Interlink Group put together. It's an excellent toolkit and for those that want to build custom file handlers in their portals, it's the way to go. I took a look at it a couple of weeks ago and am just trying to see how to leverage it to do some SharePoint wizardry that we can't get out of the box. Great stuff.

        • XmlWebPart ala carte

          The WebPartPages namespace and the various Web Parts that Microsoft has in them keeps puzzling me. While everyone is off at TechEd, some of us still have work to do (yeah, that was today's grumbling).

          I had previously tried to instantiate my own copy of a ListFormWebPart (because it's sealed so I can't inherit from it) and wrapping it up in my own custom Web Part. This failed miserably so here we are again. Now I'm bugged by the XmlWebPart. It's a great Web Part for rendering Xml without having to build your own XmlDocument and do transformations and all that jazz. Just set the Xml (or XmlLink) property and optionally the Xsl (or XslLink) property and voila, insto no-nonsense Xml rendering. Trouble is that I can't seem to do this on the fly. The Xml links have to be static.

          The best compromise I can find is to:

          1. Grab the SPWebPartCollection from the current SPWeb (through a url to a Web Part Page I create which has an XmlWebPart on it)
          2. Find the XmlWebPart on the page by walking through the SPWebPartCollection and matching up on GetType or something
          3. Set the Xml (or XmlLink) property once the XmlWebPart is found
          4. Redirect the user to the custom Web Part Page for happy viewing

          Or maybe I'm just trying to beat a dead horse and should just do my own dang transformation? I know Microsoft has to use the WebPartPages for their own Web Parts but why is it so difficult for anyone else to just tap in and leverage them?

          Man, a week without TechEd (and the bright Orlando sunshine) and it's been raining for a few days here in Cowtown. Sucks to be me.

        • Rats...

          ...MSDN documentation fails me again.

          MSDN says public virtual int CollectionBase.Count {get;}

          Reflector says public int CollectionBase.Count {get;}

          Visual Studio says cannot override inherited member 'System.Collections.CollectionBase.Count.get' because it is not marked virtual, abstract, or override

          Kinda sucks when you're trying to write Unit Tests with TDD and you can't do something as simple as this:

             26     [TestFixture]

             27     public class PluginCollectionFixture

             28     {

             29         [Test]

             30         public void UponCreationCountIsZero()

             31         {

             32             PluginCollection collection = new PluginCollection();

             33             Assert.AreEqual(0, collection.Count);

             34         }

             35     }


             37     public class PluginCollection : CollectionBase

             38     {

             39         public PluginCollection()

             40         {

             41         }


             43         public override int Count

             44         {

             45             get { return -1; }

             46         }

             47     }

          Oh well. At least I'm going to TechEd. Oh, wait. Never mind.

        • NOT going to TechEd and tracking down a SharePoint bug

          Unfortunately due to project commitments I'm stuck here in Cowtown for the week instead of basking in Florida at TechEd 2005. So expect a week of bitching and griping with at least a blog a day where I mention how craptastic it is as I read my fellow bloggers entries about how fab it is down there (and if you're blogging from down there, raise a glass to the poor schmuck here in rainy Calgary).

          I'm also tracking down a potential bug with SharePoint document libraries and single quote characters. Thanks to the resources of my team (way to go guys) we may have uncovered something that needs a hotfix (at least it's critical enough for us to have one). I still need to confirm it as I can't seem to find anything in any MSKB I've looked through (both public and private) so stay tuned.

        • Copy and Paste in Explorer View

          I've ranted before about Explorer view and how it basically screws with your version history. This is basically why I delete it on most document libraries I roll out. So if you copy and paste a document (or a series of documents) from one Explorer View to another here's what you get:

          1. The document is copied across from source to destination
          2. An entry in the version history is created in the destination library for each entry in the source document library
          3. All versions point to the unique copies of the document in the destination library but the document itself is the latest version from the source document library
          4. Comments for each version are not brought across

          YMMV. At least this is what I experience whenever I do it. Might be my infrastructure that is causing this but I've tried it with various browsers, end user operating systems, and service packs and get the same results. Try it out with your own setup and let me know if you get the same results.

          Update Note: Got an email from my fellow Canuck on the other side of our country Amanda Murphy about their product called Trace. Looks pretty nice and adds a cut/copy command to the menu and the ability to resolve conflicts (like mapping columns) when you paste a document into a new doclib. So check it out here. If you buy it remember to mention my name so I can get my $1 commission (kidding about that Amanda).

        • Whack-A-Fitz

          Fitz has been pretty quiet lately but he always resurfaces and pops up like those damned Whack-A-Mole games from time to time. I wonder what they have him doing as he's been quiet for a few weeks now (and I prodded him a couple of times in email with no response, which basically means nothing but thought I would throw that in). Anyways, he's got a nice short post on this year's Professional Developers Conference and to keep an eye on the Office/SharePoint Development Track. He dropped a hint of this awhile ago but now it looks more solid. While I hate the fact that I can't attend Tech-Ed this year and drink heavily and hang out in the SharePoint Cabana, not even a free X-Box 360 will prevent me from getting my butt down to PDC. Looks like SharePoint is going to kick into overdrive and re-enforce the message big Bill gave about SharePoint being one of the key collaboration technologies in the Office Space and Microsoft will be letting us peek at what we can expect next year.

        • Any ill effects if the crawler is removed?

          Yup, asking today instead of sharing. Ever have your SharePoint domain crawler account show up in every @$%!%!&*!@ list where there's a user lookup. I seem to have them in any of the sites we have spun up around here. A freaky looking account name that nobody seems to know who it is (ours is called spsSpider).

          So the question is, are there any ill effects removing the name from the profiles? I mean, the account is setup in the Central Admin and part of the admin group so it should have access. I guess when it "visits" the site to crawl it, it leaves its name droppings there just like any user but is there any problem removing the accounts profile from the SharePoint Profile Database. Does it come back when the next crawl happens? Is there any way to get rid of it so your users don't see it or maybe I should rename the account to Alan Smithee (heavy thud as nobody gets that joke)?

        • FabriKam on MSDN

          A few weeks ago I order the FabriKam DVD. It never arrived so I guess my order was never processed or delivered. However you can get the FabriKam DVD off of MSDN downloads now. It's under Tools, SDKs, and DDKs | Application Tools, SDKs, DDKs | FabriKam 3.1 and just under 2GB to download. Once downloaded you need to unzip the VPC image which will create your .vmc and .vhd files for running under VirtualPC or Virtual Server 2005.

          I spent most of yesterday going through the VM and it looks pretty good. Lots of great source code, tons of documentation and a fully installed and working system out of the box to play with. Includes SQL Server, SharePoint, and BizTalk along with the solution files, source code, etc. Very slick. I did find some of the Web Parts were listed as being unsafe so I had to do a re-registration of them for some of the solutions to work but that could have been me (I was running as Administrator rather than one of the FabriKam users).

          If you're looking for business solutions and ideas that use SharePoint, InfoPath, and BizTalk it's a great learning tool to start with.

          EDIT: Some people have mentioned they can't find the file. I only have a Universal MSDN account I'm not sure if they've made it available to professional and other MSDN subscriptions but you do need an MSDN subscription to get it. The path is listed above starting under the Tools, SDKs, and DDKs menu in the MSDN downloads. You can try the path here but not sure if it will work for everyone (you will need to sign in via Passport).

        • Adjusting the DisplaySize of your Fields

          Yesterday I mentioned I would post an entry on YAUSF (Yet-Another-Undocumented-SharePoint-Feature) however I think this one will be around to stay.

          When you create a list you can specify the maximum length on Text fields. This is great and will provide a warning message to the user if they enter text that exceeds this. However it doesn't (always) adjust the length displayed on the screen so most SharePoint lists look like this:

          Of course with a simple tweak in SCHEMA.XML you can have your SharePoint lists looking like this:

          The list for the first image is your typical field definition for the columns. Here's the snippet from SCHEMA.XML:

             <Field Name="Title" ReadOnly="TRUE" Required="FALSE" Hidden="TRUE"/>
             <Field Name="Name" DisplayName="Name" Type="Text" />
             <Field Name="Address" DisplayName="Address" Type="Text" />
             <Field Name="City" DisplayName="City" Type="Text" />
             <Field Name="Country" DisplayName="Country" Type="Text" />

          In SharePoint fields, there's a property called DisplaySize. Yeah, looking through the SDK won't find it in the Field element in SCHEMA.XML. In fact, you don't find it in any SCHEMA.XML file anywhere (which might be why it's not in the SDK, unsupported perhaps?). You will find it however as a Property on the SPField class. This might lead you to think that you have to write a custom program to adjust the display length of all your fields if you want to give your users something more. Not so.

          While I was digging around in FLDTYPES.XML yesterday and screwing around with the RenderPattern there was another thing that stood out. DisplaySize was a property being checked and if it was there, it was used in the creation of the HTML tags outputting in the browser. So with a little tweak to SCHEMA.XML I added DisplaySize to a few fields like so:

             <Field Name="Title" ReadOnly="TRUE" Required="FALSE" Hidden="TRUE"/>
             <Field Name="Name" DisplayName="Name" Type="Text" DisplaySize="30" />
             <Field Name="Address" DisplayName="Address" Type="Text" />
             <Field Name="City" DisplayName="City" Type="Text" DisplaySize="20" />
             <Field Name="Country" DisplayName="Country" Type="Text" DisplaySize="15" />

          Now you get the much improved version of your list for your users to add and edit items to. This made sense as the property would alter the length of the field in the UI when it gets built in OWS.JS. Through the regular SharePoint interface you can specify the length of your fields. This will prevent the user from entering more than the number of characters here in the field but does it adjust the UI? It depends.

          If you create the fields as show in the second image with the field lengths indicated, you'll get the display you see on the screen above. All done through the UI. If you don't specify a length or you change a field so it is longer than 31 characters, it will stretch the UI display out to 50 characters wide (like the Address field above). 50 characters seems to be the max width and while you can create fields that are 255 long, they'll only ever display 50 characters wide. Through the UI. If however you edit your SCHEMA.XML for the list like above and set the DisplaySize tag to whatever you want, it will appear correctly not matter what the value is.

          So if you've been paying attention:

          • Creating columns through the UI only respect the length if it is less than 32 characters
          • Columns longer than 31 characters through the UI will always fill out to 50 characters wide in the Browser, no matter what the length
          • Specifying DisplaySize in SCHEMA.XML for a field will display correctly in the Browser for any length

          Anyways, mildly bizzare and slightly odd. Differences between what you can do in site definition files vs. what (normally) your users can do isn't always the same.

        • Unlocking the elusive TelephonePattern... almost

          I spent a few hours this morning chasing down a new SharePoint unicorn. Unfortunately I haven't found the solution but it's close. Real close. My rule is that if I can't crack the secret in a few hours I'll post or email someone and see if someone can complete the work. 10,000 monkeys must be smarter than 1.

          Have you ever built a custom list and had a telephone field that looked like this:

          That's the normal way you have to define a telephone field. With a plain ordinary text field (or you could use a number field if you want). But there's no way to format this stuff for end users. Wouldn't it be great if you could have THIS!

          Well, you can. Or at least Microsoft was thinking about letting you have it. The above image isn't a custom web part. It's just a regular list but with a secret option. I just haven't figured out how to get it to completely work.

          Deep in the heart of a file called FLDTYPES.XML (one of those dont-touch-this-or-you-will-be-unsupported files) lies the heart of something just waiting to get out. FLDTYPES.XML defines all of those columns you can add to a list (Text, DateTime, Number, Calculated, Lookup, etc.) and it also determines the way the fields are rendered for the various forms (New, Edit, Display, etc.) through something called RenderPattern. If you dissect the Text field's RenderPattern you'll find a switch on a property called Format. The default value is to just write out some JavaScript to create a new TextField:

                 <HTML><![CDATA[<SCRIPT>fld = new TextField(frm,]]></HTML>
                  <Property Select="Name"/>
                  <Property Select="DisplayName"/>

          This will result in writing out the following JavaScript fld = new TextField(frm, "Name", "DisplayName"); into the browser and through a method in OWS.JS it will create a text field like in Image 1 above. However if a property called Format is set to Telephone you get this instead:

          <Case Value="Telephone">
                 <HTML><![CDATA[<SCRIPT>fld = new TelephonePattern(frm,]]></HTML>
                  <Property Select="Name"/>
                  <Property Select="DisplayName"/>

          This will result in writing out the following JavasScript fld = new TelephonePattern(frm, "Name", "DisplayName"); to the browser which will create the 2nd image above. Cool. However it doesn't work. So first we create our Text field in a custom list using the SCHEMA.XML and add our Format="Telephone" value:

             <Field Name="Title" DisplayName="Title" Required="TRUE"/>
             <Field Name="ContactTelephone" Type="Text" DisplayName="Telephone" Format="Telephone" />

          This gets us our form and the data entry looks good. There's even separate validators created for each part of the field so if you make the ContactTelephone field required, it will require the area code and phone number (doesn't need a country code). Saving the item will result in a nasty message from SharePoint:


          No such field name

          No field was found with that name. Check the name, and try again.


          So now what? If you take a look at OWS.JS you'll see that when it actually makes the call to create the TelephonePattern, it actually creates a bunch of TextFields. One for each part of the phone number (country code, area code, number). So I figured if SharePoint couldn't save it, it was because there were these new fields that didn't know how to map to the record in the list (after all I only had one field, ContactTelephone). The code in OWS.JS seems to create new fields and gives them the naming pattern of "TelephonePattern#countryCode:" + the internal name of the field for the phone. So I modified my list definition to create some hidden fields to hold those values like so:


             <Field Name="Title" DisplayName="Title" Required="TRUE"/>
             <Field Name="ContactTelephone" Type="Text" DisplayName="Telephone" Format="Telephone" />
             <Field Name="TelephonePattern#countryCode:ContactTelephone" Type="Text" DisplayName="Telephone" Hidden="TRUE" />
             <Field Name="TelephonePattern#nationalCode:ContactTelephone" Type="Text" DisplayName="Telephone" Hidden="TRUE" />
             <Field Name="TelephonePattern#number:ContactTelephone" Type="Text" DisplayName="Telephone" Hidden="TRUE" />

          Here I thought we're all set. I deployed the list and entered a new item. Field displayed correctly, validation happened and it saved! Nice. However when you look at the list (through something like SharePoint Explorer) you'll see the fields but they're all set to null.


          So that leaves us puzzled and moving onto other things. You can get the Telephone to display correctly and save correctly with those fields in there. Just no values. As the Telephone format is not documented in SDK, it's one of those things that is left up to the reader. If I use it will it be supported? It's there in FLDTYPES.XML which is a core file of SharePoint however since it's not documented, you might think it will be removed in a future release.


          Tommorow I'll blog about another undocumented property which does work and I think should be there in fhe future. If anyone completes this investigation and gets the Telephone format working please drop me a note through the comments of this entry!

        • CAML and Date Formats

          Patrick beat me to the punch and posted about date formatting with CAML (it was sitting in my blog TODO pile, I knew I should have blogged last night). The date format works alone and will return values. I just wanted to add to his post that you can add a time to the date as well if you want to a query for a particular time. For dates with time the format of the query has to be: 




          <FieldRef Name="EventDate" />

          <Value Type="DateTime">2005-05-27T16:00:00Z</Value>





          So this would return all items in a list that has a field called EventDate with a value before 4:00PM on Friday, May 27, 2005.

        • Don't Modify your Output Path. Really.

          Todays read is an excercise in balance. The balance is between what Microsoft says and what Microsoft says about development, specifically creating Web Parts. Buried deep in the best practices around the build process is a quote. "Don't Alter the Build Output Path". The section that's relevant goes on to say:

          You might be tempted to alter the output paths of your projects in order to build to a single folder and then establish file references to that folder. Do not do this for the following reasons:

          • It causes the build process to fail with file lock errors when a referenced assembly exceeds 64 KB in size. This problem is likely to be fixed in a future version of Visual Studio .NET.
          • You can encounter another problem when you reference an assembly from a folder that is designated as your project's output folder. In this event, Visual Studio .NET cannot take a local copy of the assembly because the source and destination folders for the copy operation are the same. If you subsequently remove the reference from your project, Visual Studio .NET deletes the "local" working copy. Because the local folder is the same as the assembly's original folder, the original assembly is deleted.

          Any developer worth his salt and building Web Parts probably knows that buried deep in the SPS/WSS SDK is this little tidbit:

          Specify the build output path
          This task assumes that you are running Visual Studio .NET on a server running Windows SharePoint Services or SharePoint Portal Server. Setting the build output path to the C:\inetpub\wwwroot\bin folder will build your Web Part's assembly in the same location from which it will run on your server. If you are not running Visual Studio .NET on your computer, you can copy your Web Part's assembly to the folder C:\inetpub\wwwroot\bin folder on your server after building it.

          So on one hand we have Microsoft telling us to not change the Output path, and another we have them telling us to do it. Now for most of you, changing it has never been a problem. You set it to c:\inetpub\wwwroot\bin and all is well. Your Web Part compiles and runs and you can do all kinds of things like debugging and good stuff like that. On a larger project this isn't true so heads up to those about to approch the platform. Once airborne, it's an ugly trip back.

          On larger projects there can be lots of Web Parts. Our current project (a Contract Management System) has about 40 of them but even that might be considered small. However all the Web Parts are reletively thin (as they should be) and just simply make calls to a Service Layer to retrieve Domain Objects and update the views. Nothing fancy and nothing complicated. All 40+ Web Parts compile to less than 64k. We have a single assembly that represents the Business and Data Access Layer. They're combined just because everything is sitting on the SharePoint server anyways and the DAL is just a wrapper around accessing lists using the SharePoint Object Model so again it has to be local.

          It hasn't been a problem so far and we, as documented in the SDK, changed our output path to c:\inetpub\wwwroot\bin for development. Debugging and all that goodness abounds. The problem was this morning when I added a new assembly to handle communications with a third party system (SAP). SAP (via the .NET connector) creates proxy classes for you and these can change frequently and have to be regenerated so the assembly will change often. I didn't want to keep changing our Core assembly whenever SAP changed (because every Web Part referenced it) so it was split out. Herein lies the problem that surfaced. Now the system was referencing an assembly larger than 64k and, due to circular references in the assemblies, I couldn't avoid this. There were a few other things I tried with separating and combining classes but it's just not going to happen.

          So now it's back to resetting all 40+ projects to compile to bin\Debug again and creating an extra NAnt task to do an xcopy deployment to the c:\inetpub\wwwroot\bin directory for debugging. A bit of a PITA but has to be done and it fixes the issue. As Microosft says "this will be fixed in a future version of Visual Studio .NET". I checked and compiled with Beta 2 and it seems to be fixed but then I can't fully check it because I can't run Beta 2 against SharePoint just yet.

          Bottom line, follow the first rule and don't modify your Output path and use a build script to copy the files after a successful build. Even if your project is small today, someday it might grow. So do you want the pain now or later?

        • ListFormWebPart and Tzuanmi SharePoint Designer

          Last Friday I posed the question of being able to create "more than SharePoint but less than InfoPath" input forms without having to resort to writing an entire facade on top of a SharePoint List. Didn't get any response to things but I did some digging into the WebPartPages namespace. Microsoft creates a raft of WebParts that are used to create the SharePoint UI itself. The ListFormWebPart and ListViewWebPart are particularly interesting as you just point them at a list and they're supposed to handle all the heavy lifting of generating forms and views. And they do. All of the .aspx pages for lists use them so that's how all the extra columns you add to lists and document libraries appear when you add/edit an item or document. The ListFormWebPart just automagically creates the form on the fly by interrogating the list, getting the fields and their datatypes, and creating the various controls (TextBox, CheckBox, Dropdown, Calendar, etc.) for you.

          Anyways, I thought I would be clever (I always think I'm clever when I do these things) to create one of these things (they're sealed so you can't inherit your own Web Part from them) and render it in my own Web Part. Before the render (in the pre-render event) I could just grab the contents of the Web Part and make some "on-the-fly" modifications (like joining up dropdowns, etc.). That idea is a bust because as hard as I try, I can't do anything with the ListFormWebPart once it's been created. I can create it fine, set the list name and all that jazz but it always seems to render an empty Web Part. Poking around inside Reflector didn't show me much either (is SharePoint really that proprietary that Microsoft has to obfuscate the code?) so I'm at a loss how to tap these classes. Even though they're sealed, I don't recall anywhere Microsoft saying you can't use them (some classes are marked for internal use only, but not these ones). Just use them for good, not evil. Anyways, the quest goes on and I'll continue to post my findings here as I try to discover a value for them outside of what SharePoint does with them.

          Tzunami SharePoint Designer. I spent most of my Memorial/Victoria day looking at this new tool. Tzunami used to be the old K-Wise guys (there were some tools for SharePoint 2001 from them like K-Doc if I recall). The Designer is meant to be a tool that you can bascially build up your entire portal structure offline, saving it in various iterations to a local file (after sucking down the initial site from a SharePoint server), then committing those changes back to SharePoint to create everything. The tool is just coming out and has some growing to do but the initial reaction is pretty good. There are a couple of things that I noticed with this version:

          1. There's a Disconnect option but it seems to clear the project's contents. So you're really always connected to the server but it's not like being in the web interface where everything you do is committed immediately. With Designer you must invoke the commit through a menu which then hooks up and creates/updates all your lists and whatnot. Personally I think the model isn't quite right. I would rather be able to work completely offline and then sync up (say when I got back to the office after spending 300 hours on a plane ride designing my portal). Maybe that's a feature to come. It seems like it could support it.
          2. There are a bunch of features that are grayed out in this version like copy and move but I'm told they're coming.
          3. There are some elements of editing things like document libraries (like say exposing it on the Quick Launch) that are not present in the interface. Again, I'm told these are coming.

          The biggest thing that is mulling in my noodle is the fact that you can alter creation and modification dates on things like lists and list items. I need to do some digging to see how they're doing this because the properties through the Object Model are read-only so methinks they're doing something down at the database layer because I can't see how else they accomplish this. That bothers me for two reasons. First, never ever ever ever ever (did I say ever) touch the database directly. Period. Do not pass Go. Do not collect your versioned documents. There's just so much going on behind the scenes with transactions and logging and synchronization and other SQL stuff oh my. Even if you go through the documented stored procs Microsoft just won't support you and there are so many things that can go very, very bad doing this.

          Second, while there are a lot of people that jump up and scream when they try to migrate their data into SharePoint and generally rant about how it can't retain the original dates and such, I personally believe there's good reason why those things are read-only for developers in the Object Model. Basically it's a CYA thing. Yes, your developers do need access to be able to make changes to a site but do you really want them with the ability to alter that information once it's set? With all the SOX stuff going on, it's a good thing that when you write an item to a list you'll always know who created it and when it was last modified. Hold on, now with a single tool I can alter history! I can say "No, you didn't create that document on Monday May 13, 2001. Bob created it on Friday June 3, 2002." No, that's not a feature I want to enable. As well, there's a question of data integrity. SharePoint doesn't have a lot of it. I can delete a lookup value in a list or a user from Active Directory and depending on the phase of the moon, the information may or may not be there later. However I can always be rest assured that something silly will never happen like a modification date being set earlier than a documents creation date. Well, that's out the window now with this tool and if I did have any reports I created on aging those are probably going to take some explaining now.

          Anyways, if you into cutting edge tools and don't want to wait you can contact them to get a trial version. Like I said, there are some features missing and some features you might not want to have. The support guys are excellent and responsive so if you do have any questions they'll be happy to answer. The trial runs for something like 7 days and has a limited number of commits you can make to the server.

        • Conditional Mandatory Fields and Inter-form Filtering

          No, I'm not having that big neurotic breakdown you've all been expecting (although from the title one has to wonder). I'm on a quest. A quest for knowledge. A quest for an answer. Before I head off to dig into some Microsofties gray matter, I thought I would throw these questions out there for anyone to pick at.

          SharePoint forms are pretty simple things. You define columns in a list and the ListFormWebPart will spit out a data entry form for all the fields, complete with the contract you created for each field (mandatory, html enabled, drop down list vs. checkboxes, etc.). This is great but it does have its limitations, namely two things you can do fairly easily with regular ASP.NET forms.

          The first is the idea of a conditional mandatory field (or mandatory conditional if you prefer). Suppose you want the user to enter a Company name but only if they check a checkbox on the form first. This is handled by a simple event handler (CheckChanged on the checkbox) in the Web Form. However there's no interface in SharePoint to hook into the ListFormWebPart part this way (well, none that I know of). So you either define the field as mandatory or not. The alternative is that you build yourself an ASP.NET form in a custom webpart (or use SmartPart with a User Control) and do the coding yourself and then write the results out to your SharePoint list but now you're in development land rather than configuration land and it's expensive.

          The second is filtering interdependant lists. There have been a few posts I've seen on this. Probably the best one I've seen is this one by Patrick Tisseghem in this blog. Suppose you have one list (Country) that needs to filter another (Province/State) which needs to filter yet another (City). Typical scenario. You don't want to show the list of every city to someone to pick from. You might also have a business condition where you don't want to present lists of information to some users based on some condition that's outside the scope of your SharePoint environment (say a corporate directory of who reports to whom). Anyways, again it's a fairly simple thing to do with regular ASP.NET by hooking into a change event on the list and rebinding the data to the lookup. Patrick's blog is a great tip however it does demand that you know the Guid for the list and runtime things like that to make it work. If you're trying to bake a solution into something like a SCHEMA.XML for a list you usually end up running into dead ends (see my frustration with not being able to define Lookup fields in the list definition for more on this).

          Guids are a big part of SharePoint. Every site, every web, and every list has a guid to identify it. The trouble with guids is that they're only defined at runtime, meaning you either need to suck it out using CAML (which I think I've seen done by some posts by Ian Morrish before) do drop an albeit small but custom-written-none-the-less web part onto a page to get what you need. And to tie in with the "don't touch the system files in SharePoint or you'll be unsupported" thing that has reared it's head recently, you won't be able to do this very well with stock lists or admin pages.

          Looking at the ListFormWebPart (and the other classes in the Microsoft.SharePoint.WebPartPages namespace) it may be possible to override the GetData and the RenderWebPart methods to do something funky before it hits the page. Anyways, if anyone has some interesting ideas to solving these it would be good to hear about them. It may only be that custom solutions (Web Parts) is what you need to do here but that's sometimes overkill. I'll post whatever results I find with discussions with others as we come up with them. Cheers!

        • This wasn't the excuse note you were looking for

          Dear Employer,

          Please excuse Bil Simser from work on Thursday, May 19. He is not feeling well. Bil is at home in bed for the entire day, nursing what appears to be a serious hamster attack. Bil’s illness is in no way, shape or form related to the premiere of the final installment of the greatest story ever, which, coincidentally, premieres on the same date.

          While I cannot confirm nor deny that Bil has called my company, Geek Squad, asking to be set up with wireless access “in case of a space opera-related sick day” know that if you do receive an e-mail from your prized employee today, it is most likely because He was wise enough to plan ahead in the event of illness.

          But as I mentioned before, Bil is at home, safely in bed, but reachable (in dire emergencies) by e-mail or cell.

          One more thing. Beginning at 12:00PM MST, Bil Simser will be unreachable for about two hours, thirteen minutes and eleven seconds. He will be feeling really bad at this time.

          This wasn’t the excuse note you were looking for,
          Robert Stephens
          Geek Squad — Chief Inspector

        • Someone changed my ONET.XML!

          Okay, so there's some buzz going around based on a recent Knowledge Base article (KB# 898631) from Microsoft on supported and unsupported scenarios with custom site definitions. Some people are upset at the scenarios and say that the reason why we're using sitedefs (vs .stp files) is that we can apply the changes against existing sites to "automagically" update a site. Heather Solomon (new to my SharePoint blogroll) has a great reference blog on what directories contain what files and where do they end up when a site/area gets created. Nice stuff and very handy.

          Anyways, here's some scenarios that I ran into a few times with some guidelines on how far you can push the sitedef envelope (even if it is unsupported).

          Modifying the default setups. This is completely unsupported and while I do agree (after all, I wouldn't want someone to create a new portal and have things missing that should be there) however it does create an age old problem we've had with SharePoint. You can't create a new portal with custom areas. Sure you can create new areas by cloning existing ones, but since you can't modify the default setups all portals will always start exactly the same for everyone. The real crux is for organizations that want to customize the My Site so all new My Sites will get something more "corporate" with the standard stuff. After all, I can create a new default team site by copying the STS directory and messing with all the options (say I don't want people to be able to create discussion areas, no problem). However I can't touch My Site because it's part of the base system and thus unsupported.

          There's another kicker to modifying default setups. Like I said with the Portal, these are default Setups. I don't recall seeing any hardcoded values anywhere that depends on these things being there but if I was supporting a product I sure wouldn't want someone calling me if they messed with my control pages. That's like screwing with a .NET assembly and removing bits and pieces of it and recompiling it back to hope it still works. The only thing is that you don't need to decompile the schema files that make up a SharePoint site because they're all there in front of you, with just a flick of Notepad away from becoming your worst enemy. So okay, I'll buy not modifying the default setups but for the love of all that is holy, can we at least modify My Site and have a choice of which portal definition we use when creating a new portal?

          The other non-supported scenario is one of updating a sitedef once sites have been created. I'm on the fence with this because of doing a total fubar on an existing site (which I've done many times, it's not pretty). I can understand the need to put a stake in the ground and say this is unsupported. Like I said I've messed up sites by doing a redeploy over top of existing ones and boy did it hurt. There were points where I had to open the thing up in FrontPage just to delete it. Modifing sites in-place (via an updated sitedef) is a bit of a sort spot because as Serge van den Oever put it in this blog, the reason why we use sitedefs is so we can have more flexibility with creation of a site (sans programming) and update it easily. 

          Here's the scenario I ran into with doing this. Create a list and define a field to be a DateTime field (don't get me started on Lookup fields again). Now sometime later you decide to change the DateTime field to a Text field. Boom. You try to revisit a list that uses that field and edit it and you'll be in a world of hurt. I don't have the exact DON'T DO THIS list of what fields can and cannot be transformed from and to (anyone game to putting one together?) but basically changing types can be bad. They sometimes can work. For example going from a numeric field (as long as you don't specify decimals, etc.) to text is sometimes okay. Going from Text to say Choice sometimes works. Again, there are some scenarios that work and some that just plain put you in reboot server land, you are screwed, do not pass Go. This is due to the fact that behind the scenes it's not a 1:1 mapping of column you create to column in database and all that metadata in all those tables sometimes just gets really, really confused.

          Adding new fields (or adding anything). This isn't so much of a problem. Adding new fields to SCHEMA.XML generally always works with no ill effects (and I have yet to create a situation where it did). After all you are just adding more meta data about the lists so when a list renders it's add/edit form it's just another field to display. The only drawback here is if you make a field mandatory you can end up in a situation where your lists metadata isn't valid because any new fields will just be blank.

          Of course, any of these scenarios, good, bad, or otherwise, are offiicially unsupported according to the KB article so buyer beware. What's odd is they support modifying sites via FrontPage. Now while I can only mess up one site at a time with FP, I can really mess it up with a simple removal of some DHTML or Web Part Zone tags (read: make site unrenderable to the point where you can't fix it). So that doesn't make sense to me.

          P.S. I also stumbled across a nasty gotcha recently around missing files and the execution of ONET.XML. In ONET.XML you can specify files to copy to your new site when it gets created (again, referring back to the body of this blog, this section of ONET.XML only gets executed once on site creation hence why you can't update it and expect your sites to automatically be populated with new files that were not there before). Anyways, in the Modules section of ONET you can specify files to copy and where to copy them to. This is great but you'll get a nasty message as ONET is being executed when it hits a file it can't find. Yes, it's a file not found message and the new SharePoint Blue Screen of Death which has practically no information at all. I came across this but we were creating new sites with dozens of custom lists, dozens more of lists being generated and even more dozens of files being copied. Which file was it that was not found? The FileIOException class that will get thrown if you're doing this programatically contains a property called, what do you know, FileName. So why can't the IIS log, the SharePoint log, or even the SharePoint page itself tell me what file it can't find? I had to hunt and peck through my entire system until I found the culprit. In any case, I closed the ticket with Microsoft and asked them to kindly add more information error messages especially when they know the context of the message. It's akin to you buying something and your bank or the retailer saying "Not enough funds". So how much more do I need? I'm just looking for a little break here.

        • WikiSharePoint!

          Came into the office this weekend (yeah, I need a life) and found a blog posting from last Thursday by Mart Muller. He's put together a set of Web Parts that provide a Wikipedia like experience but hosted on your SharePoint site.

          First there's the Search Results Web Part. This displays any hits on the term you search for using the Wiki Search Web Part. It has links to the content of the search results and will also automatically hyperlink phrases that match other Wiki entries. There's also a Tree View of the Wiki entries so you can navigate through preferred and variant terms. The whole thing is hosted in one custom list (a thesaurus) with logic behind it to parse out the terms and serve up the information all linked together with like terms. Adding an entry is easy and just like filling out any other SharePoint list.

          I installed this quickly and easily in our dev environment to give it a whirl. A couple of minutes later I created a site to host the web parts (you can also create an area on a portal and it works the same) and added a few terms. Simple to implement and workable. Even though Mart says this is beta, it seems to be pretty solid and usable and can only get better. Combine this with Jim Duncan's cBlog Templates and you've got yourself a pretty powerful set of services all hosted using SharePoint.

          There's been requests before about creating KBs or other type tools with SharePoint and we've all told people it's doable but just needs a little work to bring things together. I can see this as a great start at a knowledge base in your organization. Just create an area on your Portal called Knowledge Base, drop the Web Parts on, and let everyone start adding terms. The great thing is that there are lots of ways to cross link the information and terms once they're entered will automatically hyperlink to other terms in their bodies so it saves you having to manually creating links. So check out the Web Parts here and let Mart know what you think.

        • The pain of creating lookup fields

          The SharePoint UI is great for end users. With very little training they can go off and create new custom lists and through the magic of a Lookup field they can create lookups into other lists and life is grand. For the developer though life is a rotten bag of apples when it comes to Lookup fields.

          There are two ways to create new fields in SharePoint sites. You can define them through Xml or create them programatically. With the Xml definitions, it's a matter of copying the CUSTLIST definition (which is just a simple empty list with a single field, Title) to your new definition and add fields. Here's the definition for a new text field:

             <Field Name="MyField" DisplayName="My Special Field" Type="Text" />

          Simple and easy. The <Field> tag is defined in SCHEMA.XML for your custom list and supports all the tags that are in the SDK documentation. Well, almost. The Lookup type is there and so if you wanted to define it you would think you do something like this:

             <Field Name="MyLookupField" DisplayName="My Special Field" Type="Lookup" />

          The documentation says that the List and ShowField attributes can be used with this type. The List attribute just says it's the internal name of the list (which we would assume that it would be the list we want to lookup values from). The ShowField attribute says it's the field name to display and be used to override the default (Title) and display another field from an external list. There's also another attribute called FieldRef which is the name of another field to which the field refers to, such as for a Lookup field. All in all, it's very confusing but you would think you could do this:

             <Field Name="MyLookupField" DisplayName="My Special Field" Type="Lookup" List="MyLookupList" />

          And if you don't want the lookup to use the Title Field in MyLookupList then you can use:

             <Field Name="MyLookupField" DisplayName="My Special Field" Type="Lookup" List="MyLookupList" FieldRef="LookupFieldName" />

          So let's put this to test and have some real data. Let's create two custom lists called Employee and Department. Each entry in the Employee list has a Lookup field that points to the Name field in the Department list. Here's the Lookup field definition in our Employee list:

             <Field Name="Department" DisplayName="Department Name" Type="Lookup" List="Department" FieldRef="Name" />

          However if you create your lists you'll notice two things. First, if you add an item to your Employee list (the one with the Lookup field in it) you'll see there's no choices available for Department (assuming you added values to that list first). Second, if you try to modify the Lookup field through the UI you get this nasty message:

          Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

          So what gives? Simple. The List attribute, while it says it's supposed to be Text is but it's not the name of the list. It's the Guid (in the form listed above). The problem is of course that Guids are unique and only known after they're generated. There's nothing in an Xml file (no matter how great the Xml file might be) that can dynamically retrieve the Guid. So Lookup fields, IMHO, can't be used in SCHEMA.XML because they have to be the Guid of the list and that's not known until the list is created first (feel free to jump in and correct me if I'm wrong).

          Okay if we can't use SCHEMA.XML to do this, we can write code. Yes, beautiful glorius code. If you have a Lookup field and you retrieve the raw text from it, it looks like this:

          42;#Information Services

          The 42 refers to (besides the answer to life, the universe, and everything) the ID of the item in whatever list you're looking up. When you retrieve the lookup value you get "42;#Information Services" which you're going to have to transform with a simple little RegEx call if you want to show it to a user.

          So now you're thinking if I can retrieve it and get "42;#Information Services" I should set it the same way right? Nope. What you need to do is set the Lookup field with the ID of the value it's looking up in the other list. Internally when you set that, SharePoint will do a join and retrieve the textual representation of the lookup information and save it for you.

          Okay, some code to explain all this. This assumes that the site is created with both an Employee and Department list. This snippet will:

          • Add a new Lookup field called Department to our Employee List
          • Fill in some imaginary Department Names
          • Fill in some imaginary Employess that report to various Departments

          private void CreateLookup()


              SPSite site = new SPSite("http://localhost/sites/employee");

              SPWeb web = site.OpenWeb();


              // Get the Department List from the web for lookups

              SPList departmentList = web.Lists["Department"];


              // Get the Employee List from the web

              SPList employeeList = web.Lists["Employees"];


              // Add a new lookup field to the Employee list called Departement

              // that will use the Department list for it's values

              employeeList.Fields.AddLookup("Department", departmentList.ID,  false);


              // Create 2 new departments in the Department list for lookups

              AddDepartment(departmentList, "Information Services");

              AddDepartment(departmentList, "Finance");


              // Now create 5 employees with lookups into each Department

              AddEmployee(employeeList, "Mickey Mouse", departmentList, "Information Services");

              AddEmployee(employeeList, "Goofy", departmentList, "Finance");

              AddEmployee(employeeList, "Donald Duck", departmentList, "Information Services");

              AddEmployee(employeeList, "Daisy Duck", departmentList, "Information Services");

              AddEmployee(employeeList, "Minnie Mouse", departmentList, "Information Services");


              // Cleanup and dispose of the web and site





          private void AddDepartment(SPList list, string name)


              SPListItem newDepartmentItem = list.Items.Add();

              newDepartmentItem["Title"] = name;




          private void AddEmployee(SPList list, string name, SPList deptList, string deptName)


              SPListItem newEmployeeItem = list.Items.Add();

              newEmployeeItem["Title"] = name;

              newEmployeeItem["Department"] = FindDepartmentByName(deptList, deptName);




          private int FindDepartmentByName(SPList list, string name)


              int itemId = 0;

              SPQuery query = new SPQuery();

              query.Query = "<Where><Eq><FieldRef Name='Title'/><Value Type='Text'>" + name + "</Value></Eq></Where>";

              SPListItemCollection items = list.GetItems(query);                       

              if(items.Count == 1)

                  itemId = items[0].ID;

              return itemId;


          The trick here is that you need to retrieve the ID of the item in the Lookup list based on name, then use that ID and set it in the other list. This is done by a simple call to the GetItems method on the list we're looking for. There are other ways to do this so for example if you have a small list you can load it up into a Hashtable and use the name as the key and the ID as the value. Whatever works for you as the call to the query can be expensive so you wouldn't want to do this for everything but if you just need it for a report or some data loading it's not too bad. Now when you look at your Employee record you'll see it's got a Hyperlink to the Department Name field in the Department list. 15 seconds work for a user in the UI, a couple of hours for you in Visual Studio. Enjoy.

        • Get the GAT!

          If you start a lot of projects you might follow a structure or pattern to how your solution is put together. Mike Roberts has a great blog here on how ThoughtWorks generally sets up their project development tree. They also put together a simple tool to do this (Tree Surgeon). We follow a similar structure, but it's usually all done manually (usually by the lead developer or Solution Architect) at the start of the project. There are some variations on where things go, etc. and some things are driven by the demand of the application. For example if you're not accessing a database directly (like in a SharePoint application where the Database is the SharePoint Object Model) then you don't need a Database project with SQL/Oracle/etc. connections and scripts. Stuff like that makes it sometimes cumbersome to set things up and it usually takes a few hours to get everything just right and it will vary from person to person and group to group on preferences of how things are organized.

          If you follow the Patterns & Practices group over at Microsoft, you'll know they've been working on a lot of cool things. They consider themselves in the guidance business and not creating cool tools (this is the same group responsible for Enterprise Library, reference architectures and patterns and other neat stuff). Now imagine if there were a pattern you could follow based on policies and architecture your organization wants/needs/desires to adhere to. Imagine if you could just fill out a single Wizard page and have that entire solution generated for you in minutes. And that every project at your organization followed the same pattern no matter what the specifics of the project were so if you moved from project to project (or worked on multiple projects at the same time) you would immediately know where everything was and where it was supposed to go. The GAT will help you get there (and more).

          Tom Hollander has announced that the Guidance Automation Toolkit (GAT) is now available for download. This download is for Visual Studio 2005 Beta 2 and you'll also need the Guidance Automation Extensions installed (which is available on the same site). Think of the GAT as the old Visual Studio Enteprise Templates on steroids (and beyond). Anyone who built VS 2003 templates knows some of the pain and suffering involved in it. The GAT makes this easy(er) but it's more than just templates as you can implement policies and patterns and the whole thing fits into the bigger Software Factories approach to things (although we're not sure how yet, I can guess a few things that could be done in this space). Anyways, if you're into it, Get the GAT!

        • CDI Technology Briefing in Calgary

          I'm off this morning for the better part of the day to hook up with Eli Robilard and CDI on their Technology Briefing Tour which hits Calgary today. Eli got in last night and we'll be chatting up on SharePointy type stuff. If you're registered with the class hope to see you there at the Westin Hotel today. Cheers!

          PS Wow, did I blabber on Monday about WOW and 64bit stuff. Okay, blackmail material if you want to ever embarass me at the next presentation I give.

        • Drinking the 64bit Kool-Aid and knowing how it's made

          I had a painful but interesting experience the last couple of weeks. To set the stage, I currently run 6 working systems at home all networked and all with various purposes (Linux firewall, Programming box, Graphics rendering workstation, File Server, Games machine, etc.) My programming box (XP Pro) was feeling a little under the weather and there was a sale on at Memory Express for a 64bit Athlon CPU. With the 64bit version of XP released I thought it was a good enough reason to upgrade and try out life in the fast lane. Warning techie-geek speak ahead.

          So off I went and purchased an Athlon 3000+ with a Gigabyte GA-K8NS Ultra-939 Pro board. I grabbed an image of XP 64bit off of MSDN and burnt a copy and proceeded to format a new drive for the OS. The install went surprisingly well and all I had to do was install some beta drivers for the sound card. Everything else worked perfectly (including the dual LAN and SATA controllers on the mobo) and the system was flying. My intent was to try out the whole 64bit development thingy so after a lengthy install of Visual Studio 2003 (and 2005) I went ahead and tried some builds of larger systems I had, targetted specifically at x64. Again, everything went well although debugging is hosed in 64bit. It seems the perf tools don't work on x64. The monitor was unable to start the kernal mode driver (VSPerfDrv.sys) and during sampling it would create an error saying "Profiling WOW64 processes is not supported by this version of the profiling tools". I was also hoping to get Virtual PC (32bit) running on XP 64 to see how it performed and if I could do so some silly things like run a 64bit OS (like Windows 2003 Server) in a 64bit hosted VM using the 32bit application (say that 3 times fast).

          However the biggest problem with x64 is the drivers. All drivers have to be 64bit (read: have to be, not should be) and while this is true for most of the big companies (ATI, etc.) others only have beta versions out or no support at all (the on-board sound driver was beta). There's a CD that comes with the Gigabyte with some goodies on it (flash BIOS, CPU tuner, etc.) but it wouldn't run at all with a 64bit OS. Why would they package this with a 64bit motherboard? Surely they know that someone would run it on a 64bit OS so wouldn't they have tested it? Basically it came down to having to use a very limited set of hardware until the drivers are available and while the performance was there it really was hardly noticable. I think if I was running Windows 2003 Server 64bit with SQL Server (a notoriaous CPU hog) that probably would have shown better results but for a deskop OS I just don't see the value.

          In any case, I wasn't going to continue with the x64 version so flipped back to using my trusty 32bit Pro edition. Windows has this wonderful feature where after enough significant change in the hardware occurs, it wants you to re-activate itself. A change of motherboard did that. Another problem is that with my MSDN subscription, I only have 5 activations available. Like Bill Gates and his wonderful "640K ought to be enough for anybody" statement, I'm sure the MSDN Licencing guys have the same attitude. Nobody will ever need more than 5 activations on an OS. Probably true, when you're running 1 machine. Run 5 and change out your hardware every month because you have nothing better to do with your life and all bets are off. So now I was SOL with no more activations on XP installs left. A few calls, some begging and whining, some digging and I finally resorted to drop back to XP Home since I hadn't used any licenses for it in my mini-Norad setup. Of course there was no way I'm going to develop on an XP Home Edition box so more shuffling, imaging, backups, ghosting, lots of coffee and I finally have a setup that works. Took about 2 weeks in total but we're back and running all 32bit OSes again.

          Now to get to the "how it's made part". Rory Blyth had an interesting blog about whether or not viewing the Windows source would actually help anyone? Being a MVP we have (after giving up our first born and the location of the secret Kennedy CIA files) the ability to partipate in the Shared Source Initiative from Microsoft which would give us access to the codebase. However I have a hard time thinking it actually would be beneficial to anyone (except maybe someone building embedded systems). One of the big arguments you get from the open source community is that Linux source code is available and Windows isn't and if a company was in trouble by using Linux they could just crack open the code to see what was going on and fix it. Okay, sorry but I really can't buy that. I've been in the Linux codebase and while it's somewhat organized it's far from someone just cracking it open to fix something. It's like anyone who might know something about cars being asked to rebuild an intake manifold (including all the extra gotcha's like getting the timing of the system right, etc.). Yes, I really don't know much about cars but I know more about operating systems and code and I'm sure not going to start messing with kernels (Linux, Windows, or otherwise) to see how something works. It's not like tweaking an algorithm in a business application to see what the number appears on the screen next. I think it's one of those myths. "Oh if only I had the source code I could be so much more productive" or "I wish I knew what was really going on".

          Sure, I'd be the first guy to say I'd be curious to see the source code behind SharePoint and with a copy of Reflector you can see how some things are done (just blur your eyes on the obfuscated parts) but it's really just curiousity over anything. Take a peek at the Windows CE source code that Microsoft did release and tell me that you're a better person and it would have saved you all kinds of headaches "if you only knew". If anything I would see it as potentially a learning thing (and given some of the code I have seen it might be a learning platform of how not to write code) but other than curiousity or "how did they do it because it works so why not reuse it" attitude I can't see a need for it. Give me a component that works and has sufficient documentation anyday over ripping into the code to see how things work. I'd rather be a consumer of a serviceable part than knowing how the guy that wires the low-level stuff together did it.

          Intellectual property? Any corporation that produces a software product has invested oodles of cash into building it but do you think for one minute if a new "revolutionary" feature showed up in say Tiger (say a Networking Wizard, surprising similar to what Windows does) that people would'nt start looking and lawyering up to see the code that produced this miracle. There was a statement that Microsoft would lose it's competetive edge if it released it's source code. I don't know about you, but I can't imagine that happening with release of source code? Microsofts "competitive edge" is by sheer quantity of installed systems. You get that with 90% of the Desktop market and just because source code is out doesn't mean others would start building better or more competetive systems. It doesn't take a genius to figure out how to build a feature just by looking at how someone else did it. That's how the masters have been creating works of art for thousands of years.

          Yes there's been many times I've been asked at work about how something works and the answer was "I don't know, I guess that's how Microsoft did it". Had we been able to see what was under the hood would we have been able to know what's going on? Not likely. It takes some serious skill just to know what's really working in your own application, let alone having hundreds of thousands of lines of source code that you didn't create to wade through. I have yet to see a Linux developer (again, unless they're building embedded systems) do end-to-end debugging into the heart of the lion because something wasn't working quite right. I doubt any Windows application developer would do the same and I don't buy the argument that the world would be a better place if the source code was available. I just don't see enough data points to convince me but your mileage may vary.

          Okay, enough of my soapbox. Back to SharePoint development this week.

          UPDATE: After waking up I realize that having access to the Windows source has absolutely nothing to do with XP 64bit Edition. I'm not sure why I thought there was any connection there at all. Chalk this up to "insane man blogging" syndrome.

        • VS2005 Class Designer and Exporting Images

          One of my favorite features with the Beta 2 update to Visual Studio 2005 was the ability to export your Class Diagrams as images. Yes, it's simple but you won't believe how useful it's been lately sucking code in from a 2003 project, automagically creating the Class Diagrams (thank you Microsoft!) and exporting it to communicate to the development team.

          Dmitriy Vasyura of the Visual Studio Class Designer Team has an excellent post on the ClassDesigner's WebLog that goes into great depths on preparing the diagram, making use of comment shapes to annotate the diagram, documentation scenarios, and of course exporting the images. Check out the post here for more info.

        • What is an Application in SOA?

          A colleague of mine recently turned me onto Clemens Vasters blog (Thanks Rob!). Clemens latest post was entitled "SOA" doesn't really exist, does it? It led to some interesting thought but I'm not convinced that any architecture really exists in the true sense of the word when it comes to "SOA". I did agree with most of what he had to say in his blog and that most people use "SOA" as a label for the engineering components of "SO" which really isn't what Service Oriented Architecture is all about.

          Another perspective to overlay on this discussion is the notion of an "application" in SOA. In SOA you have a federation of co-operating services that are orchestrated to achieve a well defined goal or objective. This is a completely different architectural model from what we have traditionally considered an "application" to be.
          Traditional application models grew from from the notions of task automation that originated in the late 60s and the 70's. They were narrow and deep in their scope, and typically bounded by an organization unit's accountabilities. This led to a vertically organized monolith of function all the way from the UI down to the database calls. This has turned out to be somewhat limiting from the current perspectives of how businesses want to operate; companies are generally larger, more diverse, and re-organize more frequently than was common at the time these models were developed.
          When applying SOA it makes more sense to bundle services by affinity of capability rather than by "set of tasks" or "org unit accountabilities". In some ways this is similar to the data concept of organizing data by "subject area", rather than application use. For example, if you think about the original implementation of SAP, it was focused on the needs of the Finance Department with "transaction extensions" for other organization units. Some failings of this model were that SAP was an "intrusive burden" to org units other than Finance, and it couldn't support decentralized business models (just any of the decentralized companies that tried to implement it!). Today SAP is re-focusing and exposing it's core services to be consumed by other applications.
          But what if the architects for SAP had applied SOA from the get-go? The actual architecture would have been defined as several aggregations of financial capabilities (like accounts, money movements, and so on) with appropriate service contracts. It would have also included a collection of capability that would be needed by the finance functions of a typical organization, again with appropriate service contracts. It would have have included some UI capabilities (Web Parts if they were really on the ball) that could consume these services (and indeed other services from different providers) and have the "appearance" of a traditional "application". However, as architects we would recognize that what the user thinks is the "application" is really just a thin facade to the orchestrations of functions they need. An important additional capability is to easily orchestrate other services that are not part of SAP (for example, a service with AMEX to get your credit card statements that can augment expense reports).
          So the idea of SOA is to design in this set of patterns and paradigms from the initiation of the concept. Thoughts? Feedback? Pizza?

        • Back at work after coughing up a lung and hey, check out SPDesigner

          I'm back at work after a few days off (of course getting sick over the weekend is no fun). I thought my lungs were going to collapse on Friday so I headed home early and stayed in bed all weekend taking every concievable legal cough/cold remedy drug known to mankind. After 72 hours of wandering in and out of conciousness I think I'm pretty healed so back to the grind.

          By way of Daniel McPherson and this blog I found a very cool new (beta) tool by James Milne called SharePoint Style Designer (or just SPDesigner or SPSkin depending on where you look). It's basically a simple way to create your CSS files (one for SPS, one for a custom theme in a WSS site). Rather than plodding through the CSS files yourself with something like Top Style (my choice of CSS tools), James tool just breaks the sections down and gives you what you need to configure. Very cool and very slick.

          You can view the tool online here. You can tweak the values in each category and view the resulting CSS. You can even work your style online and submit it for future versions of the Style Designer. I can't seem to find a way to download it and use it locally but it's currently in beta and perhaps not available. In any case, check it out if you're looking to change the look and feel of your SharePoint installations.

        • FabriKam, FabriKam, FabriKam

          What the hell is he talking about? Only a really cool leaning platform that we've been waiting for awhile now. The Office System Fabrikam Learning Platform is now available for pre-order. The documentation has been on MSDN for quite awhile but now we can order the real meal deal. Okay, so it's still not released but according to Mark Bower here, the DVDs are currently in production and should be shipping soon. 

          FabriKam is a Virtual PC image that contain sample solutions and components for SharePoint, BizTalk, and Office 2003 with a mess of goodies that you can take and munge into your own. What's inside this package? Plenty. While you can learn about the Office System as a development platform it also contains a wealth of knowledge with best practices, white papers, code samples, etc.

          What can you do with this cool tool? Looking at the documentation there are some great OOTB (out-of-the-box) solutions in the SharePoint space like a Routing Service, a Multi-Library List View Web Part (aggregate multiple document libraries into one view), and a Project Site Manager solution. These are showcased solution samples that are initially horizontal specialty applications that can be re-used, repurposed or extended by developers. In addition to the SharePoint goodies there are some SQL Server Reporting solutions (Expense Report, Team Weekly Status Report, etc.) and other solutions that tie into BizTalk and other Microsoft Technologies.

          Be sure to get your DVD today! You can pre-order the DVD from here (no charge for the DVD, you just pay shipping) which should be shipping in about 2 weeks.

        • CDI's Education Canadian Technology Briefing Tour

          My fellow SharePointBlogger and all around nice guy Eli Robillard is off starting next Tuesday on a two week, nine city tour across Canada promoting that favorite portal you love to hate. It's a free even and he's been kind enough to slosh by and drop in on us here in Cowtown (as well as those "other" cities). You get a continental breakfast and Eli will ramble on for a couple of hours on SharePoint, ASP.NET, and SQL Server 2005. Looks like it will be fun and informative and hey, it's free. Check out the CDI Technology Briefing home for dates and schedules or head on over to the online registration to reserve your seat today.

        • Brain overloading... must release knowledge!

          Lots of good stuff going on here. I'm winding down on a fairly intense SharePoint application development project (a Contract Management system). Still a month (or 6 you never can tell with these "agile" projects) left but things are working well. 100,000 lines of SharePoint configuration (lists, sitedefs, etc.) and 100,000 lines of C# code between 3 developers over 3 months. Not a bad effort. Out of which I have to say my SharePoint knowledge (and frustrations) have soared to new heights and I'm just full of stupid little SharePoint giblets that I'll be sharing over the next few weeks (OneNote is a great tool for capturing all  these little thoughts).

          On the publishing front, I'm starting to write articles for the new SharePoint Advisor magazine. Still haven't figured out what my first one will be one (feel free to toss out some ideas if you're looking for something specific that you want me to dive into). I'm also putting together a proposal for a new book on SharePoint. I want to do something in the same flavour as the O'Reilly Cookbooks (Problem/Solution/Discussion) so I'm starting that now (again if you're just itching to get something in there now's your chance). We'll see how this goes and if I can keep up the pace of my 12+ hour days along with another 4-6 hours writing. Luckily I truly only sleep 3-4 hours a night. To bed around 10 or 11 and up at 2 or 3. Guess my body is just used to it that way (I would have used the term trained by my body is anything but trained).

          Visual Studio Team Systems is rolling and I'm just getting past a few quirks in the Beta 2 stuff. A few things I would have really liked to see:

          • I would really like to just drag one project into the reference of another. It's such a pain sometimes to bring up the dialog to set references to projects that are in my solution. Maybe I'm just complaining because b2 keeps crashing on me with this.
          • Why can't we rename classes in the Class View? We can rename them in file form (which magically will rename the class) and we can rename the class in the Designer. So why not in Class View?

          These are silly and nitpicky I know and for the most part are fine the way they work now. Just some things I thought would be nice to have.

          And here you thought this was going to be a well informed, thought out, and highly knowledgeable post.

        • Hiding a list through FrontPage

          Often you might have a list in a SharePoint site that you don't want users to get to. Something like lookup lists or whatever (adminy type stuff) that you need to have in a site but nobody should mess with. Its easy to do it through code but here's how you can do it using FrontPage 2003.

          In FrontPage open up the site that contains the list. Right click on the list and select Properties and choose the Settings tab. You'll see an option Hide from browsers. Now the list won't show up in the Documents and Lists page for prying eyes to get into. Note that this will not ghost your page/site/etc. so it's a safe thing to do in FrontPage.

          As with most things in SharePoint, the list is still there so someone who knows how figure out the url to it (which isn't hard) could still get to it. You can toggle this on and off anytime so to edit the list you make it visible, make your changes, and then turn it back off again. You could also link the list to a spreadsheet and save the sheet for future use. Then hide the list and make your edits through the spreadsheet.

        • Expanding on Expanding and Collapsing Fields in a View

          I'm pretty pleased when people get something from my blogs (it sort of validates my existing in this silly world). I'm even more pleased when they expand, extend, and otherwise enhance what started from a simple blog scribble.

          One of my fellow MVPs, Renaud COMTE, took my post on creating an toggleable (if that's even a word) DataView (with a little evil JavaScript to expand and collapse large copius amounts of text in a view) and ran with it. Him and his co-worker Eric moved the work I did into the SCHEMA.XML file for a view so it would be part of the normal views in SharePoint. Very nice stuff. You can see the work they did here.

          BTW, I really like the .Text skin that Bob Roudebush made which emulates the OneNote look and feel. You can download it from here. Nice stuff.

          A couple of other short but somewhat important tidbits for your Friday reading.

          • The Beta 2 Installation Guide for Team Foundation Server is available here. This is updated and different from the one that's included in the DVDs and MSDN download so be sure to grab it and be current.
          • The FabriKam help file is available here. We've been waiting for FabriKam for a long time (and it keeps getting pushed out). I'm interested because of some of new Web Parts in it (like a really cool Multi-doclib viewer) and the solutions that are available in it that you can customize. Guess we'll have to wait a little longer.
          • Finally there's the Virtual Server Deployment Manager. The Virtual Server Deployment Manager provides a streamlined way to manage and deploy Virtual Machines. Using this tool, regular users (not just administrators) will be able to create and manage their own machines, without impacting other users' machines. It's available here.

          Have fun and have a great weekend!

        • Best Practices and Member Initialization in C#

          Today I thought I would present two slightly different approaches to class member initialization and see what people were doing out there. When you define a class you have the option to initialize member variables in the declaration or in the constructor. Here's our class creating a new ArrayList at declaration time:

          public class MyClass


              private ArrayList myList = new ArrayList();


              public MyClass()




          So you create a new instance of MyClass and the array list it created for you. The second example is to initialize it to null (a C++ type approach) and then "create" it in the constructor:

          public class MyClass


              private ArrayList myList = new ArrayList();


              public MyClass()


                  myList = new ArrayList();



          Pretty much the same effect isn't it. There is one danger in initializing the ArrayList at declaration time though. Sometimes a developer might come along and create another constructor and re-initialize or create the ArrayList again:

          public class MyClass


              private ArrayList myList = null;


              public MyClass()


                  myList = new ArrayList();



          No big deal in C# as it'll just add a few more operations at the IL code. No harm no foul. However if your field wasn't an ArrayList but another more complex class (that maybe incorporated other classes) it might not produce the wanted effect (especially if you read a config file or something to initialize values like in a data class to read the connection string).

          Steve Eichert blogged about this a couple of years ago and asked the question as well. There didn't seem to be any hard and fast rule but there were a couple of interesting observations about it. James Curran mentioned that he prefers to initialze all data members at declaration because it parallels the initialization of local variables. That makes sense so why not? According to Sigurdur Gunnarsson, the other really interesting thing I didn't know (although I can't find it documented anywhere) is that initialization of some members (like say "string myString = string.Empty;" the compile will move the initialization into the constructor so he does his creation in the constructor to control order.

          Is there a right way or wrong way here or is it a "it depends" answer? Do you have any standards you use around doing this like "all member variables will be initialized in the constructor" (at least for consistency). The Constructor Usage Guidelines in the .NET Framework General Reference doesn't seem to suggest one or the other (although the simple example they have initializes strings in the declaration).

          PS anyone have a nice way of copy/paste code into .Text without it looking like it's been through the washing machine?

          PPS thanks to Darrell Norton for the tip on the CopySourceAsHtml addin that I've updated the blog with. Works great!

        • Validating SharePoint Web Parts

          A bit of perspective, a bit of a quandry, a bit of a question today.

          SharePoint web parts work fine with validation controls. If you just want to display a validation like any other you would do it (using a ValidationSummary control or the validation control itself) things work fine. Just add them to the Controls property of the Web Part and render them. No worries.

          Recently I had a fairly large form that contains half a dozen fields that need to be validated. Luckily they're all simple validations (required fields only). When you have a SharePoint form (using the built-in ListForm Web Part) it displays all the controls and a red "*" where required fields are. If you try to save the form without filling out any of the fields two things happen. First you get a client side message saying something like "You must specify a non-blank value for <fieldname>" (where field name is the Display Name of the field that's required). Second, it scrolls to where the control is (and if I remember correctly sets the focus to the control for entry). So here I am trying to mimic this behavior and running into some head-scratching activities.

          The way I currently started my cloning process was:

          1. Create a RequiredValidator control and attach it to my control I want to validate (a TextBox) in my Web Part
          2. Create a ValidationSummary control and set the ShowMessageBox property to true and ShowSummary property to false. This will popup a client side message box that displays whatever the error message for the control is.
          3. Set the ValidationSummary.CssClass property to "hidden" to prevent it from being seen in the Web Part
          4. Render the ValidationSummary control in the RenderWebPart method

          This works fine and gives you the same result as what SharePoint does with a Form, namely popup a message box and prevent you from going forward. This works great for the first control but then when you add a second control the message box shows all messages from all invalid controls. This isn't quite what I'm looking for as the SharePoint form will only give you the latest validation message and stop there. So without getting into managing all the various messages (say through a stack object) what gives? Also there must be a way to leverage the code that the Web Part framework has to do these validations and not have to write all this stuff over again (at least that's what my pea brain says to me) however there's nothing in the ClientAPI or the standard JavaScript (blech) files I can see that would help here.

          Anyone got some perspectives on doing validations in Web Parts. While it may look like madness, trying to mimic what SharePoint does, there is method to it. I would prefer to have a consistent view of error messages throughout SharePoint, both stock Web Parts and custom ones, so the users don't get all peeved that our Web Parts show it one way but when working in a list or doclib they get treated differently. Or maybe I'm just kidding myself here and it's not worth the effort.

        • SQL Server 2005 CTP April 2005 available

          Yeah, blog titles are getting longer and my patience for installing/uninstalling/re-installing is wearing thinner. Anyways, the April 2005 CTP edition is available for your bandwidth hogging pleasures via MSDN now. Be sure to grab the Developer Edition to get your Team Foundation server up and running (I don't think the Express edition will work but go on and prove me wrong). 840MB then another 5 hours of setting a new image again and we're golden.

        • Team System Install Update

          Just a quick update as I got a lot of emails about Team Foundation server and the fact that it states it needs the April CTP of SQL Server 2005 but that's not avialable on MSDN downloads yet. Yes, it's true but for my tests I had run using the February 2005 CTP. The install worked fine but some features were disabled (Reporting was there but not functional). I guess they'll have the April CTP up shortly so you can do a proper install so it might be best to wait for that. In addition to the SQL Server sillyness, you still need to install Windows SharePoint Services on the server with MSDE because it cannot talk to the SQL Server 2005 instance that Team Foundation uses. So at the end of the day your data server is going to be running SQL Server 2005 and MSDE which also means your project documents cannot exceed 2GB (due to the limit that MSDE has). Clear as mud? Yeah, time to hit the bottle again and wait for another download.

        • Visual Studio Team System Beta 2 First Looks

          A bit of a mouthful for a blog title but I got the whole meal deal running yesterday with Visual Studio Team System. It took 2 server setups, 1 client, a few gallons of coffee, and several dozen installs, uninstalls, re-installs and compiles to make sure everything worked correctly. And boy is it nice. I installed the Suite version which gives you all the tools that the Developer, Architect, and Test flavours have so I could give everything a run for it's money. Bear with me as it's been over 24 hours since I saw B1 and I may remember things that were there and others that were not.

          First off, it's visually a little more slicker. I can't put my finger on it but overall it's looking more polished and user-friendly. The install runs more like the Express product installs and has less clutter yet more information than Beta 1. During the install you see the list of what is being installed which is nice. I think the previous one just told you from time to time what it was doing, but this shows what's going on (okay, maybe it was too many coffees for me and it's been there all along). Once inside the product, again small visual tweaks just make it look a little better. They must have some ergonomic design team measuring every pixel and trying RGB(243, 210, 120) instead of RGB(242, 210, 120) for the toolbar colours. Overall it looks nice (but then you would hope it's visually appealing considering how much money you're going to outlay for this puppy).

          The install took an average amount of time, maybe faster than B1 (once you uninstalled your previous version). Now I'm running on a 3Ghz Xeon with 2GB of RAM so adjust your numbers accordingly. It was about 45 minutes for a full install from start to finish (including a reboot after the Framework was installed). If you just want Visual Studio without the other goodies then it should take about 30 minutes. I installed the full MSDN Library as well which took another 10 minutes then 5 minutes to watch it "optimize" everything else. So give yourself a couple of hours and relax. Some days I wish these guys would include a short film or maybe an episode of CSI (Las Vegas, not the crap ripoff versions) to watch while you're installing.

          Warning! Uninstalling Beta 2 will uninstall all previous versions of .NET. Yup, while Beta 2 and the 2.0 Framework run side-by-side no problem, uninstalling it another matter. When you uninstall Beta 2 (as I had to do once during my setup fiasco) it wiped out, removed, and decided that I shouldn't have version 1.1 anymore either.

          The IDE comes up quickly (quicker than B1 anyways) and has some small but nice changes. There's a new Community menu (at least I think it's new) that takes you (via the Microsoft Document Browser) to the feedback site to ask questions, check on a question status, or go to the new Starter Kits that are being created for 2.0. The Code Snippets are still plentiful for VB and very few for C# (which strikes me as odd but I'm sure that will change).

          I only looked at the Class Designer for now (as I still can't realistically represent a SharePoint application or site in the other Designers). The biggest change here was the ability to export to an image. You don't know how much trouble I would have to go through to screen cap a model then paste it into Paint.NET just to show it to someone. There's also a Layout Diagram option that re-arranges the diagram (works for the most part) and a couple of other little things like setting auto-width on the class so all method names are visible. I wish some of these things could be set in the options but the only Designer I could see was the Domain Model Designer but it had an error on the property page. The two big things I saw with the Class Designer was showing a property as a Collection Association (which will tell you that it can't do it if it's a weakly typed collection) and showing Abstract Classes (previously abstract classes would just show as classes but with dotted borders around them). There's also a nice shortcut on the menu to show/hide member types which is handy when you're looking at the overall diagram.

          I didn't notice any new refactorings avaiable however when I was doing a quick TDD test, the infamous squiggly line would appear saying my method didn't exist and if I right clicked on it there was an option to generate a method stub. It couldn't introduce a new class but would add a method/property/etc to an existing class. When calling methods/classes that didn't have a reference (but were in the solution) there was now an option called Resolve. This gave me a couple of options to either add the using statement or fully qualify the class name. Still not as slick as ReSharper but better than nothing. Hopefully we'll see the ReSharper for VS2005 soon.

          The big thing I found is that the Team Foundation Server now allows you to do single or dual deployment installs. Previously each part of Foundation had to reside on a separate computer so I had to consume 3 virtual machines for this (each with 1GB of RAM allocated). Now you can do a single server deploy with the data and application tier all in one. This does require SQL Server 2005 and won't install alongside some products (for example you have to uninstall Portal Server but you still need Windows SharePoint Services for the project sites).

          The Team Server stuff is just plain sweet. Once you're connected to Team Server, anytime there's a warning or error you can right click and choose to create a work item which then creates a task in SharePoint assigned to someone. Very slick to assign work this way to your team (and play a king of bughill game). Test results will be posted to the associated SharePoint site and show up in graphs depicting success to failure rates, code coverage, etc. All that neat stuff that execs and PMs want to see and that we architects and developers loathe to create.

          The Test Manager is great and while some people are against generating tests after the fact, it's a nice thing to quickly get a stub created from your Domain Entity into a test project. Each run of the tests is done and results are saved. You can create your own test lists and load other test lists (like ones created for common assemblies) into your test manager to run along with it. This allows you to split up, divide and conquer any view of how you want to test your system.

          Basically the test manager being built into the system can support programmer unit tests, manual tests, automated web tests, and generic tests of any kind. I see this as giving products like QuickTestPro and even TestDirector a run for their money. Combine this with the Team Server features and connectivity and you've got yourself a full suite of tools in one package. Crunch the numbers and I think you'll find that while most people gasp at the $10k/seat price tag of the Suite, add up all those other licenses you have for the various products out there (bug tracking, test management, source control) and you'll find it's about the same in the grand scheme of things.

          All in all, an excellent product with lots of new possibilities with the Domain Specific Lanugage modellers and designers. I'm looking forward to poking at it over the next few months as we wait in antici....pation for the final release.

        • Visual Studio 2005 Beta 2

          Hmmm, wonder how I missed a blog from yesterday? Must have been one of those days.

          Anywho, the Visual Studio 2005 Beta 2 release is available to MSDN subscribers now on the download site. It includes refreshes of SQL Server 2005 and the various Team versions of VS2005 (developer, test, architect). It also includes the Suite version which includes all three as well as the foundation (the server portion of VS2005). The Suite version is available so you can see what each flavours have capability wise and let you decide which one is right for you. Regular MSDN subscribers will only get to choose one when the product is released so here's your chance to give each one a test drive.

          (image from greg hughes - dot - net)

          What's odd is that I checked to see if it was available yesterday around 3PM which it wasn't. I check later and started downloading it off the MSDN site this morning around 1AM. By the time I headed off to work this morning at 8AM it hadn't finished downloading so I decided to just start a new download at work (besides, it's a 3.5gb image and I really didn't want to burn a DVD) however checking now it's not available to me (under the same account). Very odd to see how the trickle works so I must be hitting one of the machines on the web cluster that it hasn't made it's way down yet.

          Update: 10AM and the files are there. Now another 15 hours of downloading and a few days of blowing up virtual images and we'll be all set.

          Anyways, check it out if you have an MSDN account. I think they'll be making DVDs available for a shipping fee like they did Beta 1 but I'm sure you'll be able to pick one up at any Microsoft Event like TechEd 2005 coming up in June.

        • Expanding and Collapsing Large Fields, DataView Style

          Okay, got a fun one today. I was asked by someone who had a list if the description column could be collapsed and expanded. Currently if you have a list with a description field and put the description field on a view, you're left with a large verbose scrolling piece of ugliness. After a few vanilla latte's and some dead brain cells I came up with what I thought was a pretty good solution (without having to resort to writing a custom Web Part). Here's the solution.

          1. First create the list or decide what list you're using. It can be any list but the reason we're doing this is because we want to show a description field or something that would have a lengthy bit of text.
          2. Create a new Web Part page and put the list on it with the view you want to use.
          3. Now load up the page in FrontPage 2003
          4. Right click on the list and choose "Convert to XSLT..." to convert it into a DataView
          5. Somewhere down in the page source for the DataView there's the XSLT code to display the Description field you want this to work on. In my example I have a field called Description so you'll see something like this:


            <TD Class="{$IDAEAF1I}">

            <xsl:value-of disable-output-escaping="yes" select="ddwrt:AutoNewLine(string(@Description))"/>


          6. Now we want to change the output to show our collapsed or expanded text. This is done by surrounding the XSL tag with some regular HTML and a reference to some JavaScript (yes, horrors of horrors) that we'll add to the page later. So change your XSLT code to your liking but it'll be something like this:


            <TD Class="{$IDAEAF1I}" width="200px" bgcolor="#ffff00">

                <a title="Show/Hide" href="javascript: void(0);" onclick="toggle(this);">


                        <xsl:value-of disable-output-escaping="yes" select="ddwrt:AutoNewLine(string(@Description))"/>




            In the example above, I've done a few things: Fixed the width of the TD surrounding the Description field to 200 pixels; Given it a yellow background so it stands out; and added the reference to our JavaScript function called "toggle" in the OnClick event of the new link surrounding our XSL output.
          7. Now we'll add a simple piece of JavaScript (yeah, you knew this was coming) to the page through a Content Editor Web Part. Add it to the page then in the Source View add this JavaScript:

            <script language="javascript">

            var isCollapsed = false;

            var fullText = "";

            function trimText(text, size)


                var tmp = "";

                tmp = text.substring(0, size);

                tmp += "...";

                return tmp;


            function toggle(link)


                if (isCollapsed == true)


                    link.innerHTML = fullText;

                    isCollapsed = false;




                    fullText = link.innerHTML;

                    link.innerHTML = trimText(fullText, 60);

                    isCollapsed = true;




            This will get a copy of the Description field and save it (for restoring later) and trim the text down by the amount you specify (I've put in 60 here but adjust as you see fit).

          That's it. Here's what the DataView Web Part looks expanded:

          And here it is collapsed after clicking on the Description:

          Simple and easy. Hope that helps.

        • SharePoint Podcasting in English

          Michael Greth over in Germany has put together a neat podcast on SharePoint, the first one in English. Mike has been doing SharePoint podcasting for awhile now (he's on his 10th one) but this is the first one he's put together in English (with his uber-cool German accent). You can check out Mikes post here or download the MP3 file directly here.

          If you don't know what podcasting is, think of it as audio blogging (overly simplified but its the concept). There are also video podcasts but for the most part they're usually audio (MP3, etc.). The term sort of grew out of Apple's iPod but has gone on way beyond that. It's a pretty slick concept and very interesting. In the IT world (and say SharePoint) other than news I'm still trying to figure out how it could be interesting. I used to listen to an internet broadcast audio show (via BluesNews) on Quake and the various FPS happenings out there (can't remember the name of the show) and it was always fun. Having a weekly SharePoint show is a concept too but then there's podcasting so you could just put MP3s up for people to listen to. I'm still just trying to figure out how I could make SharePoint exciting through audio because without a whiteboard and some code samples, I'm a pretty boring guy. There's a pretty cool article on making your own podcasts (as well as how to get them) here so check it out (and don't blame me if you become addicted).

          Patrick Tisseghem jumps in for a short bit to talk about the SharePoint Advisor Conference in June as well. I was planning on going to the conference but for some reason nobody got back to me quick enough to get a presentation ready (or I didn't get it submitted in time or some forces of nature prevented me to connect to the city that never sleeps) so again I won't make it (that's 3 conferences I've missed so far this year but for sure I'll be at PDC and the MVP Summit).

          Anyways, I'm quite supportive of this and will probably try doing a little of it myself (doing a text blog as well as a podcast or something). Guess my short radio DJ job so many years ago might still pay off. Watch for something silly in this space (more silly than my normal rants) coming soon to a MP3 player near you.

        • SBS Usergroups Workshop - Hosted by SBS MVPs

          Forgive me bloggers, for I have sinned. It's been a week since my last blog. Okay, so no SharePoint or DDD babble today but wanted to tell you about an upcoming event on SBS (Small Business Server) here in Cowtown.

          From Susan Bradleys blog:

          The Canadian SBS MVPs invite resellers and consultants who want to understand solutions for small business customers to join together for an evening of presentations and discussion. The local chapters of SBS and Windows professional groups across Canada are joining together with sponsorship by Microsoft to bring a group of Microsoft Small Business Server “Most Valuable Professionals” to meet with you. Each of the SBS MVPs appearing on this tour is an experienced resellers and a community leader. You can expect the same no-nonsense expertise on SBS and related technology applications you read in the newsgroups to be brought to this discussion.

          You will have a unique opportunity to speak informally or ask technical questions from some well respected MVPs from across North America, including our special guest, Jeff Middleton SBS MVP (US). For this event series (except Toronto), Jeff will be explaining how his Swing Migration method for SBS and Windows server upgrades ends working on weekends or extensive business shutdown.

          Here are the event details:

          Thursday, April 21, 2005 6:00 PM - 10:00 PM (Mountain Time)
          Welcome Time: 5:45 PM
          Language: English

          Location: Altius Centr - 2nd Floor Boardroom
          500 4th Ave SW
          2nd Floor
          Calgary, Alberta

          Here's the link to the MSDN Event page where you can register. Hope to see you there.

        • Repository Save vs Update

          One thing that has bugged me to no end (yes, I'm easily irked) is the concept of Save vs. Update. People seem to always follow the CRUD (Create, Read, Update, Delete) mentality even when dealing with objects. Take a class following the Repository pattern:

          public class Repository


              public static void Update(DomainObject obj)


                  // Find the information to update

                  // Update the values



              public static void Save(DomainObject obj)


                  // Add a new item to the repository

                  // Update the values



          So fairly straight forward. If I have a DomainObject that I have to make changes to then I call Repository.Update(). If I want to add a new item to the repository then I call Repository.Save() but that means that somewhere outside my Repository I'm determining if I need to update or save? Isn't it the same. A variation on the Repository could be calling the Save method Add instead but the end result is the same. I don't believe that any object outside of the Repository should have to determine whether or not it's a new item or updating an existing one. Maybe what I really want to do is this:

          public class Repository


              public static void Update(DomainObject obj)


                  // Determine if this is new or not

                  // If new, add a new item otherwise

                  // find the existing item and update the values



              private static void Add(DomainObject obj)


                  // Add a new item to the repository




          So now I'm only exposing the Update method to any callers to the Repository and let the Repository make the decision whether or not this is a new item or not. The Add is hidden and maybe I have a private method to do a find based on an identity in the DomainObject. In some cases (like if my Repository is a facade to a DBMS) then I really just need a new id back from the add then I could do a Save using that information which would transmogrify my Repository into something like this:


          public class Repository


              public static void Update(DomainObject obj)


                  // Determine if this is new or not



                      DomainObject.Id = Add();



                  // Now update the item using a Mapper




              private static long Add()


                  // Add a new item to the repository

                  // could be in-memory or a write to a DBMS

                  return SomeMethodToAddRecordInDBMS();



              private static bool FindById(long id)


                  // Do some kind of find of an item with the same identity

                  return SomeMethodToFindRecordInDBMS(id);




          Does this make sense or does this just fly in the face of a Repository as well as falling into a Transaction script? Would like to see some concrete examples of using a Repository as I've only seen a couple and what we've been doing may or may not be on track.

        • Document Mover Utility

          Stumbled across a new utility that popped up on my SharePoint radar (Sharedar?). Here's the blurb from the author:

          Documents Mover is a tool that moves the files between sharepoint document libraries and keeping the version history and the directory structure of the files.

          Simple enough. I gave it a whirl and it works pretty well. Good error handling and such. It does suffer from a few problems that the author might want to consider on enhancing (and these are just my nitpicks):

          • The tool only allows you to move files from one document library to another in the same site/area. Personally I would want something that moved from one site to another.
          • The tool is another one that has to be run on the server. When are we going to be able to write tools that work anywhere? (yes, you could use my SharePoint Wrappers but it has limited functionality)

          Okay, so the second point is more of my rant about how to build tools for SharePoint rather than what the author did. Anyways, nice handy tool if you need to move documents around in a site and retain the history. Check out the tool and download here.

        • MVP for another year!

          My MVP anniversary is coming up (April 12) and like a bad penny, yes, I'm back in the clan (for at least another year).

          Normally Microsoft sends out a congratulations message then a small package with the MVP details, NDAs, etc. Again like last year, my MVP package came before the email telling me that I would be getting the package. Guess the MVP gals are a little dyslexic. No matter. I'm quite happy to be be recognized again and will continue to be as witty and annoying as I was last year.

          Here's to another year of SharePoint evangelizing, postings, blogging, rants, raves, tools, and all around good times (although my frustration levels continue to rise so I might just scratch out the SharePoint Portal Server text on my award and change it to WebSphere).

        • Code Structure with VS2005 Using Partial Classes

          Thanks to Trent on suggesting to use a partial class for implementing the auto-code part of a class from yesterday. I thought the idea of partial classes was neat but the only thing I could think of was where you had a large class so you split it up into logical components for multiple people to work on at the same time. Personally I wouldn't let my classes get that big but you never know on a large system. However it seems perfectly suited for this type of separation. Okay, maybe so I'm not the first to explore things to do with partial classes when you're bored. Cut me some slack for being a year late to catch up on things and check out:

          Making Sense of Partial Classes
          Create Elegant Code with Anonymous Methods, Iterators, and Partial Classes
          Understanding and Using Partial Classes

          Here's a sample class split up into two files. UserCG.cs and User.cs. One is for interacting with the Class Designer and the code it generates. The other is for hand coding your Domain logic.

          /// <summary>

          /// This part of the class has the code generated fields and properties.

          /// </summary>

          public partial class User


              public User()




              private string name;

              public string Name




                      return name;




                      name = value;




              private string emailAddress;

              public string EmailAddress




                      return emailAddress;





                      emailAddress = value;





          /// <summary>

          /// This part of the class has the coding implementation.

          /// </summary>

          public partial class User


              public void DomainMethod()





          It's not perfect as you may want to use the Designer to add a bunch of methods that should be in the Domain logic but then you could just add those by hand and keep your fields, properties and interface implementations in the UserCG.cs file. Just right click on the Class in the Designer, choose Properties, then specify which source file any new members added to the class will be added to through the New Member Location property. So now you can keep all the frilly stuff out and put your Domain logic in a single file for your class. Of course some people will recognize this as it takes me back to the old days when we had an Implementation and Interface file from our Delphi/Turbo Pascal days. Very slick none the less.

        • Changing the way you code, physically?

          I've been doing a tremendous amount of work with VS2005 lately (and getting all our ducks in a row to set things up to embrace it, this isn't just another software upgrade kids) and noticed something funny that I wanted to ask people about.

          Currently we generally follow a standard on how we organize our class code inside. Specifically the ordering of how this appear in a class, adding regions surrounding them, etc. This is our basic layout for a simple class:

          public class User


                 #region Fields

                 private string name;



                 #region Constructors

                 public User()





                 #region Accessors


                 public string Name


                        get { return name; }

                        set { name = value; }





                 #region Methods



                 #region Private Methods




          Generally the meat is in the middle with the public methods. Private methods live down below hidden in a region, fields up top, etc. It basically gives us some organization when jumping around in the code. Grant you these days people use the drop down method list or navigators like ReSharpers.

          When using VS2005 you have the option (it's not forced thank god) to create your classes using the Class Designer. Here's our class created with it, all pretty and nice, in the happy new designer:

          And here's the code generated behind it:

          public class User


                 private string name;

                 public string Name


                        get { return name; }

                        set { name = value; }



                 public User()





          Notice something huh? The Name field was added first then I decided to add a constructor. So the code follows it the way it was entered in the designer. Even after all that (or if you created the code manually) when you say add a new string field called emailAddress then using the refactoring tools to encapsulate it you get something like this:

          private string emailAddress;

          public string EmailAddress




                        return emailAddress;





                        emailAddress = value;




          So Microsoft chose to group the private field with the public accessor. Sounds kind of sane. 6 of one, half a dozen of another. Just wondering if this is going to bug anyone where the codebase reads differently (at least from an organization point of view) than what they might currently do. Is it time to start changing our code organization efforts to accomodate for this so we don't end up with some code looking one way and some looking the other?

        • Fix ONET.XML and win a prize!

          Cheap huh? Okay after yesterdays ObjectMother fiasco I think I've calmed down now. Thanks to those who posted the comments and information. I always find it hard to get good examples of unit testing out there and it's always hard to know what to test. All the TDD examples I've seen are so simple and the some of the examples you can find are usually large frameworks that are generally testing infrastructure. There doesn't seem to be a good set of samples out there that actually tests business objects.

          Anyways, back to SharePoint and how I adore ONET.XML and all it's happiness. Here's a simple challenge for someone with more Xml skills than I do (which isn't saying much).

          We all know (or should know) we can embed Web Parts on a page and automagically have them populate the pages when a site is created using the <AllUsersWebPart> tag in the </Project/Modules/Module/File> section of ONET.XML. The contents of this tag is essentially the DWP you would see from an exported Web Part. Take any Web Part, export, copy and paste into ONET.XML and Bob's your uncle. For the Content Editor Web part, this Xml fragment is surrounded by a CDATA tag. Okay, everyone's on the same page so far. Good.

          The challenge is that when you export the Content Editor Web Part it embeds a second CDATA tag for the actual HTML content you created. The problem is that the result in ONET.XML isn't valid Xml and when the site gets created an error is thrown. Here's the Xml that causes problems:

          <AllUsersWebPart WebPartZoneID="PageTitle" WebPartOrder="1"><![CDATA[<WebPart xmlns:xsd="" xmlns:xsi="" xmlns="">
          <Title>My Title</Title>
          <Description>Use for formatted text, tables, and images.</Description>
          <Assembly>Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
          <ContentLink xmlns="" />
          <Content xmlns=""><![CDATA[<div class="ms-pagetitle">My Text Here</div>]]></Content

          The problem occurs after the content (My Text Here) and the "]]". SharePoint (and any Xml editor) thinks this is closing off the first CDATA that was created up at the beginning of the <AllUsersWebPart> tag.

          So what should be the fix? Post your answer in the comments and I'll verify it later today. Winner gets a free copy of Enterprise Integration Solutions by Devin Spackman and Mark Speaker.

          Update: We have a winner! Jim Duncan was the first to point out to remove the embedded CDATA tag and encode the HTML within the <Content> tags. Here's the corrected Content Editor Web Part that you can embed in an ONET.XML file:

          <AllUsersWebPart WebPartZoneID="PageTitle" WebPartOrder="1"><![CDATA[<WebPart xmlns:xsd="" xmlns:xsi="" xmlns="">
          <Title>My Title</Title>
          <Description>Use for formatted text, tables, and images.</Description>
          <Assembly>Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
          <ContentLink xmlns="" />
          <Content xmlns=""><&lt;div class="ms-pagetitle"&gt;My Text Here&lt;/div&gt;</Content

        • Advantages to using an ObjectMother and Why should I test string = string.Empty?

          In my never ending quest for the holy grail I continue to ask more questions than I answer. Recently as I was putting together our unit tests for a project, I decided to give the ObjectMother pattern a whirl. This is a pattern dreamed up by some ThoughtWorkers and is a simple, scalable framework whose sole purpose is to construct and facilitate the customization of test objects. ObjectMother manages the lifecycle of test objects including creation, customization and, when necessary, deletion. I think it's an interesting pattern but is there a real advantage to using it over just creating and initializing objects in your test [Setup].

          Lets say your have a Task class in your Domain that manages tasks for users. Here's our Task class:

          public class Task


                private string name = string.Empty;

                private string owner = string.Empty;

                private DateTime dueDate = DateTime.Now.AddDays(7);

                private DateTime notificationDate = DateTime.Now;


                public Task()




                public string Name


                      get { return name; }

                      set { name = value; }



                public string Owner


                      get { return owner; }

                      set { owner = value; }



                public DateTime DueDate


                      get { return dueDate; }

                      set { dueDate = value; }



                public DateTime NotificationDate


                      get { return notificationDate; }

                      set { notificationDate = value; }



          There are some requirements the business tells us that we want to test against.

          • The due date must be greater than the notification date
          • A task must be assigned to someone
          • A task must have a name

          This leads us to building some tests that look something like this:


          public class TaskTests



                public void SetUp()





                public void TearDown()





                public void TaskCreation()


                      Task task = new Task();

                      task.Name = "Release Windows under the GPL";

                      task.Owner = "Bill Gates";

                      task.DueDate = DateTime.Parse("12/31/2009");

                      task.NotificationDate = DateTime.Parse("01/01/2010");

                      Assert.AreEqual(task.Name, string.Empty);

                      Assert.AreEqual(task.Owner, string.Empty);






                public void DueDateAfterNotificationDate()


                      Task task = new Task();

                      task.DueDate = DateTime.Now.AddDays(1);

                      task.NotificationDate = DateTime.Now;

                      Assert.IsTrue(task.DueDate > task.NotificationDate, "Due date must be after notification date.");              




                public void DueDateBeforeNotificationDate()


                      Task task = new Task();

                      task.DueDate = DateTime.Now.AddDays(-1);

                      task.NotificationDate = DateTime.Now;

                      Assert.IsTrue(task.DueDate < task.NotificationDate, "Due date cannot be before notification date.");              



          Using the ObjectMother pattern, I can initialize my task object with the appropriate values using static creators like so:

          public class ObjectMother


                public ObjectMother()




                public static Task CreateTask()


                      Task task = new Task();


                      task.Name = "Release Windows under the GPL";

                      task.Owner = "Bill Gates";

                      task.DueDate = DateTime.Parse("12/31/2009");

                      task.NotificationDate = DateTime.Parse("01/01/2010");


                      return task;



          And I modify my tests to check against values from the ObjectMother like so:


          public void TaskCreation()


                Task task = ObjectMother.CreateTask();

                Assert.AreEqual(task.Name, string.Empty);

                Assert.AreEqual(task.Owner, string.Empty);




          The traditional way of initializing my task object would be in the [Setup] method in my test class (using a private field called task of type Task) and initializing the values to some constant in my test. Alternately to the ObjectMother method above, I could create static fields in the ObjectMother the same way for comparision (or pass in values from the Test to the ObjectMother.CreateTask method to initialize them to known values). Here's the setup for my test in my [TestFixture]:

          private Task task;

          private string defaultTaskName = "Release Windows under the GPL";

          private string defaultTaskOwner = "Bill Gates";

          private DateTime defaultTaskDueDate = DateTime.Parse("01/01/2010");

          private DateTime defaultTaskNotificationDate = DateTime.Parse("12/31/2009");



          public void SetUp()


                task = new Task();

                task.Name = defaultTaskName;

                task.Owner = defaultTaskOwner;

                task.DueDate = defaultTaskDueDate;

                task.NotificationDate = defaultTaskNotificationDate;


          And my test would compare values to private fields of the test class which makes the creation test look something like this:


          public void TaskCreation()


                Assert.AreEqual(task.Name, defaultTaskName);

                Assert.AreEqual(task.Owner, defaultTaskOwner);




          So where is the advantage to using an ObjectMother? Rather than comparing values against the private fields in my TestFixture I could compare them against static fields in the ObjectMother class. Maybe the ObjectMother is for more complicated objects that need lifecycle management but then do I really want to mix object creation in my tests?

          More importantly, should I really compare a DateTime value to a DateTime value? Is that a valid test or am I testing the assignment of variables in the .NET framework. True, if you put logic into the Task class setter for DueDate and NotificationDate you can throw an exception so it doesn't allow invalid dates which would give me a more valid test. How many times have you seen this test:


          public void TestValidOwner()


                task.Owner = "John Smith";

                Assert.AreEqual(task.Owner,  "John Smith", "Task Owner does not match");


          I've just seen too many samples claiming that it's a valid test when all they're doing is comparing a string to a string (alternately getting the string from a const value in the test class instead). How much value does this test add to your system?

        • What's a Web Part for Anyways?

          Maybe I'm getting senile in my old(er) age. Maybe I'm just emotionally upset that my blog isn't listed on the usual ones for SharePoint. Maybe I'm just angry at the world. Anyways, I have to wonder about Web Parts and what is out there. Walk with me on this one. I look around and see lots of people writing new Web Parts which is great. But then I have to wonder is it really that great? Let's look at the classification of Web Parts that seem to be prevelant out there.

          These are things that rollup information from the current site. This can be documents on a site, list items (rolled up and presented into a chart), or a list of sub sites under a parent to create a dynamic site map. CorasWorks has this nailed down pat with their suites of tools (even allowing you to create your own rollup no matter what or where the content is). There are lots of others that do pretty much the same (both free and commercial).

          So many feeders and consumers we have a plethora of choices in this area.

          Display User
          I don't know how many times I see the "How do I show the user his name" Web Part. The variation on this is to display all users (much like the Members Web Part) pulling information from AD, another site, a list, etc.

          Document Management
          Lets face it. Some of the document features of a doclib are pretty sad (like the inability to simply move a doclib from one place to another without enabling Explorer View that I can't stand). I've seen a few Web Parts including a recent one that presents a different view of a document library (a more Explorer like interface with a treeview and the details).

          Recent Updates
          A Web Part that shows what's been going on like documents posted in the last x days, lists updated, who visited, etc.

          Similar to the document management problem (and somewhat tied into the Rollups) is navigation. People seem to want different navigation so there are gobs of treeviews out there that show sites and subsites in every which way you can. This includes some other type of vertical navigation across an entire site like breadcrumbs and tabs.

          Search Enhancements
          A few of these have come out recently (including free ones from commercial vendors) basically enhancing the somewhat simple full-text search of WSS.

          Did I miss anything? Probably. There are others out there. The point here is there really substance. The top 5 components on Microsofts Component Directory? A training kit that Microsoft created, 2 Web Parts that are bundled in with Office downloads, an RSS feeder, and an admin tool. What is it that people want besides what is already out there because frankly, these things listed are pretty standard fare. Is the SharePoint Web Part space that barren already? Where is that "killer" Web Part we've all been waiting for?

          Or maybe the Web Part ideas are exhausted and what we really need are templates that cater to delivering complete solutions. Jim Duncan provided this through an experiment he did on building a blog site using WSS which looks awesome. Serge van den Oever (got your name right this time) also put together an enhanced dicussion list (still nothing as close to what I consider a discussion forum like phpBB, but great none the less). So maybe more list and site templates are what the community needs and not Web Parts? How about a Knowledge Base site template you can drop in and customize to your corporate needs. Or a Help Centre system complete with automated emails and ticket management. Not impossible to do and these templates can be built to adapt to anyones configuration if done correctly. Some of these solutions might contain custom Web Parts (like Jim's does) but again those are specialized for a specific purpose and not something anyone can use on any old Team site.

          The Web Part framework was designed to provide a well crafted and simple system where you could plug anything (yes, anything) into a Web Part Page and benefit from it. Are the only Web Parts worth building the ones that solve a very specific business need like pulling SAP data from a backend system or talking to your corporate database systems? Is there nothing that is general enough that everyone wants, needs, desires that a Web Part could provide for you? I have yet to see the burning conversations in the newsgroups on "If only I had a Web Part that did...". Wouldn't that make people leap up and start building it (I know I sure would). It just isn't happening. So has the Web Part outlived it's glamour and the honeymoon is over already?

        • Visual Studio 2005 and SharePoint

          In my ongoing attempt to try to leverage the 2005 tools with our SharePoint development I continue to make some headway (not much though). I'll probably have to shelve my ideas for awhile as it's getting more and more painful everytime I try to model something. I mean, all of our code is just .NET classes. The UI is represented by Web Parts but the designers are having a hard time understanding these concepts. The problem is twofold with the 2005 tools. First it doesn't recognize somethine like SharePoint where there's an application layer, Web Services, Web Parts, a set of .NET classes to access the system (the SharePoint object model), and a database behind the whole thing. Second is that it's hard to just represent a plain jane .NET assembly as a tier in your application architecture.

          In UML it's easy to put together a component called "Business Logic" then associate a few groups of classes (Domain Objects, DTOs, Services, Gateways, Mappers, etc.) with the component. That would all get deployed to a SharePoint server (or several of them) in a deplooyment diagram. In the Application designer I can only represent things for Web Services, Windows Applications, or Web Applications. Maybe I'm trying to drill down too deep but is it much to ask for a component that represents my Business Logic other than a "GenericApplication"?

          On the plus side, it does understand Web Services so I've created a template that represents all the SharePoint Web Services (both Portal and WSS) which I can reuse. It did a great job of creating a definition of the Web Service and it's handy as a re-usable component, of course we don't use Web Services to get the job done as we have to talk to the object model directly. I've started building my own DSL templates for the Application and Logical Data Center designers that work with my SharePoint setups (even going so far to try to get the deployment part started but there are other challenges with that). I'm sure Microsoft will come along and provide these themselves some day so mine are just throw away at this point, but at least it's starting to look and feel like SharePoint (even if I can't deploy a 2.0 solution to SharePoint until at least 2006).

          I'll see if I can get some pictures up of what I've done so far and where the challenges are. Of course give yourself at least a day to install, uninstall, and re-install your tools if you're moving from Beta 1 to the Technical Refresh. Even on a beast of a machine that I have for this (Xeon 3Ghz) its taking forever.

        • Is it DTO or Dto? FxCop can't decide.

          Okay, I give up. Sure this might be minor to some but it's bugging the heck our of me this fine morning. 

          FxCop is a great tool. Sure, there are sometimes a few too many warning messages that it yells at you with and sometimes it suggests stupid things but for the most part it's yet another good tool to use to give your assemblies a sanity check. I ran one of our systems through FxCop to see what would come up, if there was anything we majorly missed and if there was something we should go back and refactor.

          FxCop is just plain retarted when it comes to the Data Transfer Object pattern. We have a folder in our domain called DTO that appropriately holds any Data Tranfer Objects we create. Of course a folder in a .NET project creates a new namespace but that's fine. So we have our namespace called AppName.DTO (it's not AppName but you get the idea) and there are several DTO classes in there for a Project, a Task, etc. Naturally we named these ProjectDto, TaskDto, etc.

          So first FxCop didn't like the namespace AppName.DTO and complained with the LongAcryonymsShouldBePascalCased error. Fair enough. So that means we should renamed the namespace to AppName.Dto to make it stop complaining. However right afterwards it complained with the IdentifiersShouldBeSpelledCorrectly when it hit our ProjectDto class, moaning that it didn't recognize the token 'Dto' in the class name.

          So which is right?

          1. AppName.Dto.ProjectDto
          2. AppName.Dto.ProjectDTO
          3. AppName.DTO.ProjectDto
          4. AppName.DTO.ProjectDTO

          I can't seem to find a combination that FxCop won't complain one way or another between the namespace and class names.

          Update: Thanks to Joe for the clarification. It's not really FxCop that's braindead about Data Transfer Objects, it's the guy creating them (yeah, that would be me).

        • Documenting SharePoint Solutions with Whitehorse

          I'm currently trying to document (via reverse engineering and a some manual efforts) a .NET application built on top of SharePoint using Whitehorse. Whitehorse is the codename for the Visual Studio 2005 SOA tools (or maybe it's the codename for all of the new graphical designers in VS2005 I can never get that straight). Anyways, we have a SharePoint solution that is made up of a gaggle of Web Parts, a domain and various service and utility classes. Rather than using the normal UML markup for documenting our architecture (which I've already started) I wanted to give VS2005 a run for it's money and see how easy (or hard) it's going to be to move toward this. UML is nice and works but being a Microsoft shop, we're moving towards the DSL approach where the model is the system and away from the UML documentation model where it's just a pretty picture but not reality. My end goal here is that if I document the current (ASP 1.1/SharePoint) system now and it (somewhat) reflects reality then moving to a 2.0 based system where the model is <strong>real</strong> and not just a disconnected set of bits, I get a model of a system that works to show what the migration path will be like. It would make it easier if I took a regular ASP.NET app to do this, but I figured let's really challenge the system (even though VS2005 won't be out til later this year and SharePoint won't support .NET 2.0 until at least 2006).

          Anyways, using drag and drop it's easy to lay out a system with the new tools. You drag an ExternalDatabase onto the model and specify the connection, etc. This is all great as you can use the items from the toolbox. Only problem is that there's nothing I can use to represent a SharePoint site or system because it's a bit of a hybrid. It's UI <strong>and</strong> a data access component. There's a nice little wiget to drag a BizTalkWebService on the system (or just a regular ExternalWebService) but we're talking to SharePoint through the object model. What the heck do I use to represent this? A WebApplication? An ExternalDatabase? A GenericEndpoint? Anyone tried this or have some thoughts on modeling a solution where you're using various parts of Microsoft systems as essentially middleware?

        • New Toronto SharePoint User Group

          Eli Robillard flipped me a note about a new SharePoint User Group he's starting up in the Toronto area. The first meeting is April 13 so you have plenty of time to get it into your calendar. If you're in the Toronto area, drop by and say hi. His blog entry on it can be found here and the main User Group site can be found here so please RSVP via the website on the meeting invite so Eli knows how many pizza boxes to bring ;)

        • Keep the SharePoint Web Parts burning

          I don't normally blog twice in the same day, but I was talking to Mike Fitzmaurice about SharePoint Web Parts, Smart Part, ASP.NET 2.0, and migration strategies. He's posted a blog entry that is a sort of roadmap for WSS into 2006 and is an excellent summary of what's going on at Microsquishy. Basically in a nutshell, WSS "v3" is built on top of the ASP.NET 2.0 Web Part Framework and don't plan to use Whidbey Web Parts in SharePoint sites for at least a year. Definately don't deploy ASP.NET 2.0 on your current SharePoint infrastructure unless you're into pain and suffering.

          My advice is to crack open that preview copy of Whidbey and the 2.0 framework (when you have time), build some ASP.NET 2.0 Web Parts using the framework and get to know the new classes intimately. They are your friend and a powerful allie they are.

          You can check out Mikes full blog entry here.

        • Bob Mixon's excellent SharePoint / BPM Review

          Over the past month or so fellow SharePoint blogger Bob Mixon has been doing some evaluations with various business process management solutions. He based his criteria on a few things like a GUI for modeling the workflow (for non-developer type guys to get their hands dirty), integration into the core Microsoft infrastructure (including WSS and SPS) and integration with other tools like InfoPath, etc. The result? A fantastic scorecard that gives his overall ranking of the products and rankings on the various criteria he was evaluating against. A most excellent resource for those that are looking in this space and don't know what to do. I did find it interesting he didn't include BizTalk in his eval though. You can check out his blog entry here. Thanks Bob!

        • Web Parts and ASP.NET 2.0

          Dino Esposito has a nice summary article over at TheServer.NET on his thoughts around ASP.NET 2.0, the Web Part framework it offers, and ideas around where SharePoint could/should go. In the article he designs a realistic component and build it as a SharePoint WebPart (an Amazon search tool) then he builds the same component as an ASP.NET 2.0 WebPart. For awhile we'll have to be playing catchup as ASP.NET 2.0 comes out, then an update to SharePoint to match. In the end they'll be a convergence, just hard to see where or when that will happen so in the meantime we just struggle along our way.

        • Creating multiple lists from templates

          In the current project we're doing, we create multiple document libraries in a site when a user selects a value from a list. The choices for the list are business templates for new Contracts. A Contract can be implemented through several document libraries. Each document library makes up part of a full document that is assembled together later when the user wants to preview the whole thing. Okay, so we're golden. When we first did this we thought this would work. Iterate through all the custom list templates and build a new document library based on it. This code does that, but doesn't work:

          public void DoesNotWork()


                 SPSite siteCollection = new SPSite("http://localhost/sites/sitename");

                 SPWeb web = siteCollection.OpenWeb();

                 SPListTemplateCollection customListTemplates = siteCollection.GetCustomListTemplates(web);


                 SPSite testSite = new SPSite("http://localhost/sites/sitename/subsite");

                 SPWeb testWeb = testSite.OpenWeb();


                 foreach (SPListTemplate spListTemplate in customListTemplates)


                        string newListTitle = spListTemplate.Name;


                        // this fails with internal error when adding multiple lists

                        testWeb.Lists.Add(newListTitle, "", spListTemplate);


                        // this doesn't fix it





          The problem was that we would open the target web (testWeb in the above code) and create all the document libraries we needed to based on the templates from the parent site. These were adding new document libraries based on a template, everything was valid but it would throw an exception on the second call to testWeb.Lists.Add. Even with the testWeb.Update call it still didn't help. So we had to collapse all our documents into a single one until we figured out why.


          After doing a couple of spike projects we found that we had to open the web each time for the multicreate to work. So this code fixed it:


          public void Works()


                 SPSite siteCollection = new SPSite("http://localhost/sites/sitename");

                 SPWeb web = siteCollection.OpenWeb();

                 SPListTemplateCollection customListTemplates = siteCollection.GetCustomListTemplates(web);


                 foreach (SPListTemplate spListTemplate in customListTemplates)


                        SPSite testSite = new SPSite("http://localhost/sites/sitename/subsite");

                        SPWeb testWeb = testSite.OpenWeb();

                        string newListTitle = spListTemplate.Name;

                        testWeb.Lists.Add(newListTitle, "", spListTemplate);




          Yes, you should call Dispose on the SPSite and SPWeb objects. In any case, this code works but I'm still not sure why?

        • ITPro Calgary and TechNet Winter Tour

          No SharePoint blog today but just to let you know I'll be at the TechNet Winter Tour in Calgary on March 15 (and if all works out I'll shuffle up to Edmonton for the 17th event too as MVPs are scarce up there). I'll be there wearing two hats of sorts. One as the president of the Calgary ITPro User Group and the other manning the Ask The Expert booth mainly for SharePoint technologies but I'll field questions around the technologies used on the presentation which covers Virtual Server 2005 (Great for SharePoint development setups kids), Windows Server 2003 (the core ingredient to SharePoint, see how I tie all this in?), Network Security (SharePoint has security, hey there's a pattern forming here), and Exchange Server (SharePoint, mail, alerts, you see the connection...)

          As for the Canadian ITPro User Groups, we kicked it off late last year in Calgary (along with most of the other Canadian ones) and did start the ball rolling. Now we're getting serious with a few hundred people coming out to the Mariott Hotel event. In this event, Bruce Cowper will be looking under the hood of Windows Server System. Lots of great stuff planned for this group and activities in Calgary this year.

          The venues are all filled up now but there will be more to come so stay tuned. Bruce Cowper will be presenting from Microsoft at both events and I'll be doing various stuff like serving soft drinks and running to Future Shop to buy XBox prizes or something. Watch for more Calgary ITPro User Group stuff coming shortly. Hope to see you there!

        • New Discussion Board Template

          The WSS Discussion board template is probably one of worst implementations of a threaded forum I've ever seen. Compare it to the typical Forums we see like phpBB, ASP.NET Forums, Snitz, etc. and you'll probably agree. However, finally, someone has stepped up and put together a nice alternative.

          Thanks to Serge van den Oever who brought us the Macaw SPS Joust Menu for SharePoint 2001, he's now put together the Macaw Discussion Board, a WSS template that provides last-post first views, a discussion thread view, and SWYRO (See What You Respond On).

          Great stuff! You can find the templates here for download and documentation here on his blog. Enjoy.

        • MSDN Article: Customizing List Item Forms

          A new article on of the MSDN Office Development Centre today that goes in depth around customizing forms used with List Items. Well done and informative so check it out here.

        • Looking for SharePoint Database Explorer?

          While I may be slow on the draw some people might be looking for James Edelen's excellent SharePoint Database Explorer tool. His old blog on vanished (much like my portal did this morning) so he's moved sites to new blog site here. SharePoint Database Explorer is a great tool for troubleshooting SharePoint, especially if your portal is non-functioning. With just the database files you can usually restore what you need. You can get both the binaries and source to his database tool as well as SPExport here.

        • 1 is the lonliest number

          SharePoint. Some days you love it. Some days you hate it. Today is my hate day.

          Site definitions are a pretty cool thing in that you can create a whole bunch of stuff for a user without lifting a finger. In ONET.XML you can create new lists in the <Configuration> tag. So go ahead and create a bunch of document libraries like this:

          <Configuration ID="0" Name="Default
          <List Title="Document Library 1" Url="Document Library 1" Type="101"/>
          <List Title="Document Library 2" Url="Document Library 2" Type="101"/>
          <List Title="Document Library 3" Url="Document Library 3" Type="101
          <List Title="Document Library 4" Url="Document Library 4" Type="101
          <List Title="Document Library 5" Url="Document Library 5" Type="101

          Great. You now have 5 brand new unique Document Libraries, all with their own paths that you can add documents into. With ONET.XML you can also add these Document Libraries to a page automatically so we do this:

          <Module Name="Default" Url="" Path
          <File Url="default.aspx" NavBarHome="True
          <View List="101" BaseViewID="0" WebPartZoneID="Footer"/>

          Awesome. Your Document Library is now smack in the Web Part Zone named Footer on your home page. Hmmm. Which document library? You only got to specify List="101". But now you're saying that you have not 1 but 5 of these things. Therein lies the rub. Just how do you get the second one on the page? And the third? Me little brain thought I would be clever and try this:

          <Module Name="Default" Url="" Path
          <File Url="default.aspx" NavBarHome="True
          <View List="101" BaseViewID="0" WebPartZoneID="Footer" Url="Document Library 1" />
          <View List="101" BaseViewID="0" WebPartZoneID="Footer" Url="Document Library 2" />
          <View List="101" BaseViewID="0" WebPartZoneID="Footer
          " Url="Document Library 3" />
          <View List="101" BaseViewID="0" WebPartZoneID="Footer
          " Url="Document Library 4" />
          <View List="101" BaseViewID="0" WebPartZoneID="Footer
          " Url="Document Library 5" />

          After all, each Document Library did get created and had a unique Url. Nope. This just created 5 copies of Document Library 1 on the page.

          Update: Thanks to Frans for the suggestion to change the Type in the ListTemplates section. It seems to be the only way to create multiple unique document libraries. At least you don't have to create a whole different folder under the LISTS directory and you can reuse the DOCLIB one. So basically in your ListTemplates section of ONET.XML do this:

          <ListTemplate Name="doclib" DisplayName="Document Library 1" Type="500" BaseType="1" OnQuickLaunch="TRUE" SecurityBits="11" Image="/layouts/images/itdl.gif" DocumentTemplate="101"/>
          <ListTemplate Name="doclib" DisplayName="Document Library 2" Type="501" BaseType="1" OnQuickLaunch="TRUE" SecurityBits="11" Image="/
          layouts/images/itdl.gif" DocumentTemplate="101"/>
          <ListTemplate Name="doclib" DisplayName="Document Library 3" Type="502" BaseType="1" OnQuickLaunch="TRUE" SecurityBits="11" Image="/layouts/images/itdl.gif" DocumentTemplate="101
          <ListTemplate Name="doclib" DisplayName="Document Library 4" Type="503" BaseType="1" OnQuickLaunch="TRUE" SecurityBits="11" Image="/
          layouts/images/itdl.gif" DocumentTemplate="101"/>
          <ListTemplate Name="doclib" DisplayName="Document Library 5" Type="504" BaseType="1" OnQuickLaunch="TRUE" SecurityBits="11" Image="/_layouts/images/itdl.gif" DocumentTemplate="101"/>

          It's the Type that has to be unique, not the Name. This will allow you to put multiple document libraries onto a single page when a new site is created from your template.

        • NAnt, NUnit, and NDoc... the hard way

          I live and die these days by the holy trinity. NAnt, NUnit, and NDoc. They're lifesavers when it comes to automating builds, doing testing, and quickly generating API docs for your code (which helps if you're passing it off to another group for support).

          However I'm screwed right now with these tools and stuck to using the command line (which is ok because I grew up out of that world). For NUnit, I was using the NUnit add-in which was great but then it "evolved" into TestDriven.NET. Great. A nice MSI package that you can install and now you can right click on test and run it. The output window shows you any tests that failed and a double-click on it will take you to the offending test. Only problem is that I run it and get yelled at that my version is old. Checking the Download page the last few weeks I've been getting nothing but an error page with an ICAP Error (whatever that is). The download page just doesn't seem to come up for me no matter where I'm trying it from.

          The other bee in my bonet is NAntRunner. NAnt is a great tool and our build script kicks (as much as a build script can). However I always have a console window open to run NAnt so work in the VS.NET IDE, switch to command window, run NAnt, lather, rinse, repeat. Okay, I could add NAnt to my Tools menu but it just opens a window and runs so it's hard to see when something goes wrong. Plus I would have to do something funky so I could specify different targets, etc. NAntRunner is a nice looking add-in that is supposed to recognize your .build file and will let you (graphically) pick a target and run it. The results will also be output to the Visual Studio IDE so I can just happily work in my environment. However I have yet to successfuly get NAntRunner working. The SourceForge project didn't a source release but the code is in CVS so I could see what's wrong and maybe fix it, but I don't want to do that. That's like renting a car and filling it with gas but it still doesn't do anything. It's not the end-consumers problem that the tool doesn't work (and others say they can't get it to work either). Obviously it somehow got working for the guy that wrote it as I can see screenshots of it in action. However, looking at the code reveals some really ugly assumptions like where cmd.exe is installed and where Visual Studio lives. I just want to use something that works!

          It would be nice if I could just press a keystroke combination, see the output of my tests, run and deploy my build with NAnt all within the Visual Studio IDE. Is that too much to ask for? Sigh.

        • Automagically updating themes

          Themes are great in that you apply them and an entire WSS site is transformed before your very eyes. However there are some drawbacks to themes, namely they live on the SharePoint server (which you may or may not have access to in a production environment) and if you change a theme, it doesn't re-apply itself to a site immediately. Actually I've always found that you have to apply a different them, then re-apply your own theme. There are other ways to apply a theme like using the Object Model but that requires code, etc. and is pretty messy just to change the look of your site.

          Here's a trick that you may want to employ for your sites. Create a new theme using the normal editing process as outlined in the SDK. However when it comes to editing your THEMES.CSS file, simply enter this for it:

          @import url("http://servername/filename.css")

          The filename above refers to a CSS file that you control. Place it on a central web server or something and update it anytime you want. Voila. All WSS sites using this theme will be instantly updated (well updated the next time a user visits the page) using the changes you apply to your CSS file.

          A couple of additional tricks you can do here. Rather than put your CSS file on a web server (where it might not be accessible due to production servers being locked down) put it into a SharePoint document library. Not only will you get security around it but you get version control for free. Another thing is you can combine the THEMES.CSS file with the stock SPS.CSS file to create a mega-CSS file that both your portal AND your WSS sites can use and create a consistent look between the two.


        • SharePoint Wrappers 0.10

          Back in the middle of last year, I had created a set of .NET classes that let me access SharePoint through Web Services. I generally was frustrated with having to always create the web service, assign credentials, etc. and then if I wanted to connect to another server/site, I had to create a different reference or re-use one and set a bunch of properties. The big problem was that almost anything anyone wanted to do had to happen on the server and frankly, I despise running client tools (even if they're utilities) on a server. Servers are meant to run well, servers. Workstations are meant to run clients. How often do you see someone running Office 2003 from a server? The other problem I saw was that SharePoint Web Services, while great and all, didn't always give me everything I needed from one service. Sometimes I had to call on 2 or 3 different services at the same time to accompish a single task.

          Anyways, this led me to create a set of wrapper classes. Classes that let me deal with SharePoint servers, libraries, lists and whatnot like real objects and simple methods. I've created a new project on SourceForge to house these and uploaded the initial revisions into CVS (here's the link to CVS through your browser). You can grab them from the site here through anonymous CVS access (instructions here). I haven't done an "official" release yet but you can compile it and create the API doucmentation with the built-in NAnt script. There are plans to do both a Gui and Web based set of sample programs (like a non-runat-server version of SharePoint Explorer). I chose SourceForge over something like GotDotNet just because it has a few more services that I like and I run a bunch of similar projects off it. If GotDotNet adopts the SharePoint platform as some discussions have been going on and there's a source control plug-in, then maybe things will move.

          These do not mimic the SharePoint object model 100% as it was a lightweight solution to providing access to remote clients. It can grow, however I probably wouldn't want to see it completely do everything the OM does. The intent however is to provide enough capabitilies so you don't need to run applications on a SharePoint server (so you can build desktop and non-SharePoint web based tools for SharePoint). What can you do with these things now? Plenty and it's pretty simple. You can easily:

          • Connect to a SharePoint Server, get its properties, and enumerate sites
          • Connect to a SharePoint Site, get its properties, and enumerate lists
          • Create lists, doclibs, and list items
          • Upload documents to a document library
          • Get all versions of a document in a library

          How do you use them? It's fairly simple:

          SharePointSite site = new SharePointSite(url);
          foreach(SharePointSite subsite in site.webCollection)

          If you do have suggestions or would like to signup for the project, drop me an email. More updates on this in the coming week with some samples, additions to functionality, etc. and whatever suggestions you guys have. Here's to expanding the project to be a useful tool in your SharePoint arsenal!

        • Who the heck is SPSTaskUser?

          And more importantly why is he filling up my Application logs with these:

          Windows cannot unload your classes registry file - it is still in use by other applications or services. The file will be unloaded when it is no longer in use.

          Perplexed? I was. Until I spent a couple of days with a very fabulous Microsoft support person (Thanks Tracy!) going through a few errors we were having on a couple of our portals.

          SharePoint (both SharePoint Portal Server [SPS] and Windows SharePoint Services [WSS]) have a few combinations of installs:

          1. SharePoint Portal Server using the built-in database engine (plain old MSDE)
          2. SharePoint Portal Server using SQL Server
          3. Windows SharePoint Services using the built-in database engine (new and cool WSMSDE)
          4. Windows SharePoint Services using SQL Server

          Each has it's merits and downfalls (MSDE is limited to 2GB whereas WSMSDE doesn't have that limitation). Normally in a development setup you might decide to just install option #1, SPS with the built-in database engine. After all it's easy right? You don't have to do worry about a separate install of SQL and it's service packs and all that mumbo-jumbo. With that combo though comes, your friend and mine, SPSTaskUser. I was really perplexed as to who this user was? I certainly didn't create him. After a little Googling, others mentioned him (but usually it was "Who is this SPSTaskUser?"). However, just like why the infant universe did not simply spread out evenly after the Big Bang 14 billion years ago, the answer is here.

          Installing SPS in this configuration creates a new local machine account called SPSTaskUser. The default website Application Pool (and all portals created after that on this server) will use a predfined Network Service account to do all the SPS crawling. When you set this up and your crawler kicks off (in my case it was every 10 minutes) you'll get a pair of messages in your Application Event Log like this:

          2/18/2005 4:00:05 PM Userenv 1516 NT AUTHORITY\SYSTEM SERVERNAME Windows unloaded user S-1-5-21-2435244326-407298798-4041372769-1009_Classes registry when it received a notification that no other applications or services were using the profile.

          2/18/2005 4:00:01 PM Userenv 1524 SERVERNAME\SPSTaskUser SERVERNAME "Windows cannot unload your classes registry file - it is still in use by other applications or services. The file will be unloaded when it is no longer in use.

          It's rather annoying and was causing me some grief as I personally don't like anything but Information in my Application logs (and even then I get a little torqued about the amount of those Windows creates). Anyways, we spent some time and I was convinced that we hadn't created that user. SharePoint also creates a new scheduled task in the Windows Task Scheduler for each crawl of some content (luckily WSS only installs don't have this). That task will run as, you guessed it, SPSTaskUser. And we all know that when Scheduled Tasks run as a local account rather than a domain one it causes problems don't we kids?

          We didn't find there were performance issues with the server, but it was dang annoying. There's two ways to fix this blip. The easiest answer is to just use SQL instead of MSDE. With SQL as the backend, two things happen. The Application Pools for the websites use a named user (a domain account you create with a non-expiring password) rather than the built-in NETWORK SYSTEM account. Second, the Default Content Access account (or Application Pool account, I can't remember which) that you specify to crawl content will be the account that runs the Scheduled Tasks. Problem gone, Application logs clean. Move along. A second option (although I haven't tried this) is to keep on using MSDE (although why would you?) and manually replace the Scheduled Task account with some domain account that you have for this type of stuff. That should fix it but your mileage may vary so caveat emptor.

          One note, I don't know if WSMSDE creates this guy or not so maybe someone can confirm that and post a comment on it. I suspect it might not and the SPSTaskUser only gets created with SharePoint Portal Server and MSDE because it's the one doing the crawling of content (WSS searches content using SQLs Full Text Search engine).

          Anyways, hope that helps someone out there and have a great weekend!

        • SharePoint Pet Peeve #327

          Dear Microsoft,

          Please enable alerts to fire when an item is submitted to a list that requires approval.

          Man, I don't know how many times I keep forgetting to go to a raft of lists that I have to approve content to see if anything new has been added. I know that the EventHandler interface for lists was omitted due to timing, but having to manually check lists where approval is required is rather annoying.

          Nintex has a pretty good add-on for Document Libraries but it doesn't work for Lists. There are some Web Parts floating around that will show you what needs you approval which is good too. However I was hoping to minimize some of the extra add-ons that I feel should be part of the base system.

          Okay, enough ranting for this morning.

        • Best Practices for Writing HTML in Web Parts?

          Something that's as puzzling as the Cadbury secret (and we all know that us programmers figured that out long ago) is just what's the best way to write out HTML in Web Parts? So call me masochistic but I write Web Parts with code. Yes, it's ugly. Yes, it's painful. Yes, you could use something cool like SmartPart or load the controls yourself (but that brings on a host of other issues like Code Access Security so we won't go into that).

          For those of us that hold true to the "old fashioned" way, what's the best way to write all that code out? Consider these two approaches that writes out a label and control in a row for a form:

          private void RenderRow(HtmlTextWriter output, Label label, WebControl control)


                 output.Write("<tr><td class=\"ms-formlabel\" valign=\"top\" nowrap=\"true\">");


                 output.Write("</td><td class=\"ms-formbody\">");





          private void RenderRow(HtmlTextWriter output, Label label, WebControl control)




                 output.AddAttribute("class", "ms-formlabel");

                 output.AddAttribute("valign", "top");

                 output.AddAttribute("nowrap", "true");




                 output.AddAttribute("class", "ms-formbody");






          Both output exactly the same HTML. Does it matter? The first approach is less lines but is it any more (or less) readable? Or maybe everything should be built up in a StringBuilder class and slammed out to the HtmlTextWriter? Or is it simply whatever is readable or maintainable works? Looking for your thoughts, ideas, suggestions, rants, assorted concealed lizards of any kind.

        • Opening Links in new Windows

          This question gets asked a lot in the newsgroups. The default behaviour of the links list (which is just a template afterall) is to open the link in the same window. I took a look at Jim Duncan's cBlog site definition recently that had a nice modification that I think should be on everyone's SharePoint box. He added a simple checkbox to set a link to open in a new window.

          First you'll need a new site definition so copy STS to another one for this purpose. Then copy the Links list definition to a new one (it's in a folder called FAVORITES). Alternately, you can just work directly on the definition itself but see the note at the end of this blog about that. In the LINKS definition they'll be a SCHEMA.XML file which defines all the fields and how the list behaves.

          First let's add the new checkbox field that will hold our new option:

          <Field Type="Boolean" DisplayName="Open in New Window" Name="NewWindow"/>

          Great. Now it'll show up on the New and Edit forms and be saved with the list. How do you get it to show up in the rendered HTML? This is done in the DisplayPattern tag for the URL field. The default Links list part that we're interested looks like this:

          <HTML><![CDATA[<A onfocus="OnLink(this)" HREF="]]></HTML>
          <Column Name="URL" HTMLEncode="TRUE"/>
          <Expr><Column2 Name="URL"/></Expr>
          <Case Value=""><Column Name="URL" HTMLEncode="TRUE"/></Case>
          <Default><Column2 Name="URL" HTMLEncode="TRUE"/></Default>

          So we want to do a check on our NewWindow field and if it's set, add in a "target=blank" piece of HTML to our HREF tag. So the new DisplayPattern tag should look something like this (changed highlighted in Red):

          <HTML><![CDATA[<A onfocus="OnLink(this)" HREF="]]></HTML>
          <Column Name="URL" HTMLEncode="TRUE"/>
          <Expr><Column2 Name="URL"/></Expr>
          <Case Value=""><Column Name="URL" HTMLEncode="TRUE"/></Case>
          <Default><Column2 Name="URL" HTMLEncode="TRUE"/></Default>
          <Field Name="NewWindow"/>
          <Case Value="Yes"><HTML><![CDATA[ target="

          That's it. A simple change to one file and all your links have the capability to open in new windows across all your sites. You can preset this value if you want (using the <ROWS> tag in your sitedef) and hide the field or let your users choose. Of course, modifying your base SharePoint install isn't recommended as the next service pack or update may wipe out those changes however for this change I'm willing to do the file management myself to avoid this. Your mileage may vary.

          The other trap is that all the sites that are out there, already created using the STS template might break. Adding a new field to a definition usually is ok but it's something you need to test big time if you have a lot of sites out there already created (NUnitAsp is great for this). It would be nice if it was part of the base system though wouldn't it?

        • MSOS DevCon, Word XML, and the Mvp.Xml Project

          I was invited, but unfortunately due to scheduling conflicts I was unable to attend this years Microsoft Office System Developer Conference in Redmond this past week. My loss as Bill Gates gave the keynote about the importance of XML, connectivity, ease of development, lower CTO, better performance, extreme developer tools (VS2005 is just plain freakin' amazing, my words not his) and the importance of reuse and leveraging both 3rd party and MS developers to build interopabile solutions. The great thing (from my perspective) is that SharePoint is being positions at the core of most of the products which means lots more development and collaboration to come.

          Mike Fitzmaurice gave a presentation about how SharePoint can be used to access backend data services (SAP, Siebel, PeopleSoft, etc.) including some discussion around BizTalk, SSO (Single Sign On), etc.

          I think one of the key things is to look at storing Word, Excel, etc. files in XML when saving stuff in SharePoint rather than the traditional DOC, XLS, etc. formats. I noticed the recently released (2/4/2005) Word XML Software Developers Kit which follows the Office XML Reference Schemas that were published awhile ago. Displaying Word XML docs in a browser (via SharePoint and an XSL file) is so much better on performance than launching embedded Word and you've got so much more power like loading it up into an XmlDocument and modifying it rather than the traditional Word COM fiasco.

          On the Xml front, you might also want to check out the Mvp.Xml project here which is aimed at supplementing .NET framework functionality available through the System.Xml namespace. Helps a lot when you're working with Xml Web Services coming out of SharePoint.

        • Stupid SharePoint Fact #327

          Ever wonder why all those FrontPage (and subsequently now SPS and WSS) directories were called /vti? VTI was the acronym for a company called Vermeer Technologies Incorporated. Microsoft aquired the company in 1996 which had a flagship product. This product eventually became FrontPage. Hence all the vti directories all over your servers. You can check out the original press release here on it.

        • Reading vs. Updating objects in the SharePoint Object Model

          A message came up on the newsgroup about someone having a problem with this code:

          System.Guid listId=web.Lists.Add(title,description,web.ListTemplates["Document Library"],web.DocTemplates[0]);

          They were creating a list (a document library in this case) and wanted to display it on the Quick Launch. The code looked okay but the list wasn't being displayed on the Quick Launch. After a little experimenting (going down a couple of turkey trails like web part vs. console app) I found this slight change worked:

          System.Guid listId=web.Lists.Add(title,description,web.ListTemplates["Document Library"],web.DocTemplates[0]);
          SPList list = web.Lists[listId];

          I do remember passing by a document somewhere that said when accessing classes in the SharePoint namespace for updating to use the actual objects rather than an index of a collection. For whatever reason, I just naturally always get the list object myself so never came across this before. For reading purposes (like listing all the lists on a site) it's fine, but updates need to be implemented this way. I can't find that link right now but I did find a blog by Kris Syverstad from July of 2004 here on it to which Peter Provost thought maybe the WSS team implemented a property indexer when they probably should have implemented a method.

          Looking through the newsgroups, this is probably one of the biggest "why doesn't my code work" message posted when it comes to updating properties. This tip will be true for any object in a collection (SPSite, SPList, SPField, etc.). Good stuff to know.

        • AlternateHeaders and WSS sites...

          ...doesn't work. Yup, plain and simple. The ONET.XML file describes site definitions and can contain an attributed called "AlternateHeader" which you specify as your own aspx page living in the LAYOUTS\1033 directory. By default, all portal areas (everything under the SPSxxx folders) have this set to "PortalHeader.aspx" which just brings in the various CSS files and registers a couple of tag prefixes for accessing SharePoint Web Controls. However, none of the WSS site definitions have this AlternateHeader defined. You might think you're smart (several people have thought this) and set the AlternateHeader attribute to PortalHeader.aspx and magically all your WSS sites will start looking like they actually belong to the portal (i.e. having the same Portal navigation, etc.). Nope. All it does is create chaos and anarchy because SharePoint controls don't necessarily work in WSS sites. And it's only Tuesday...

        • Zero touch RSS Web Part

          George Tsiokos wrote me about a service he put together and is offering for free (under the MIT Licence). You enter an RSS feed URL on his page and he'll generate a DWP file you can upload directly as a Web Part onto your SharePoint Web Part Page. It uses the DataView Web Part and XSL to perform the translation so requires no server software installation (except the upload which anyone with the add web part right can do). It produces a nice, clean, RSS feed from news items with a link to each entry. The title of the Web Part links to the parent site where the feed came from. His DWP file supports RSS 0.90, 0.91, 0.92, 1.0, and 2.0 versions as well as Atom and Microsoft's Channel Definition Format. You can check it out here on his site.

        • YASPQ

          I live and breath computers. Each and every day, for 12-16 hours a day, I sit in front of a computer spitting out various artifacts (mostly Internet Explorer/Firefox history links, but the occasional piece of code, application, document, or architecture that makes some kind of sense). Here's Yet Another SharePoint Quirk (YASPQ) that make me loathe that collaboration environment we all know and love.

          Security. Love it or hate it, it's all around us. After all, without it everthing would be well, unsecure. SharePoint and Web Parts (and the .NET Framework to a lesser extent) has a big tie-in with security. Writing Web Parts is pretty straight forward however you'll run into a few security hurdles if:

          • You want to reference other assemblies in your solution (things like domain objects or data access layers or the recently released Enterprise Library of application blocks, very cool and probably deserves a blog entry of it's own on incorporating them into SharePoint Web Parts so stay tuned)
          • You want to reference the SharePoint object model (what else would a SharePoint Web Part do?)
          • You want to make external calls to services like external Web Services or access sites using something like the WebClient or WebRequest classes.

          Just spitting out HTML in your Web Part is easy. Talking to the SharePoint Object Model (which you'll want to do if you want to display SharePoint information like lists of sites, document library info, etc.) is a little more tricky but can be easily fixed by changing the trust level to WSS_Medium. Talking to other assemblies can easily be accomplished by adding the [assembly: AllowPartiallyTrustedCallers()] which shouldn't be a concern (although it could open your assembly up to attacks from that yet to be created .NET managed virus).

          The three options you get with developing SharePoint Web Parts are evil, but balanced in a kind of masochistic way (much like writing Web Parts from scratch which I can now say I can do in my sleep and usually do).

          1. Increase the trust level of the entire virtual server. Best option to keep your development cycle happy (compile directly to the BIN directory or have a NAnt script drop it there for you) and no IISRESET required. Least secure though and affects all assemblies on the virtual server.
          2. Toss your Web Parts into the GAC. Less secure but easy to implement. Not a great development option though as you have to do an IISRESET each time you update the Web Part.
          3. Create a custom policy file. Talk about complicated (no less than 5 steps to implement this and a bugger to get it right if you don't know where all the files are located on the server). The most secure and basically the most flexible as you can tune the security to the Web Part itself. However I've never seen any commercial, freeware, or otherwise Web Parts ship with a policy file or install one.

          Anyways, a few options and definately something you should be aware of. Developing can be easy (and unsecure) and you can leave the heavy lifting up to consumers if you're creating Web Parts for others. In-house Web Parts should go through the motions and create and implement custom policy files so you can co-exist nicely with a locked down portal. You just need to do a little more legwork on these. Here are a few resources to get you more info:

          Microsoft Windows SharePoint Services and Code Access Security
          Creating Web Parts that Call Services

          SharePoint, Code Access Security and SmartPart

          PS I notice while I'm blogging on the .Text website my cursor is updating with each character I type and pausing from time to time. Must be something in the control doing an autosave of the blog, but it's damn annoying!

        • Leveraging SharePoint Web Part capabilities

          I'm stuck. I think I'm caught between a rock and a hard place.

          Currently with SharePoint you have 3 ways to create web parts.

          1. Define the views and all that stuff and drop it on a page.
          2. Create a DataView Web Part (with FP2003) and drop it on the page.
          3. Create everything from scratch.

          With the first two options, you can get all kinds of nice features like column sorting, filtering, etc. Free. No coding required. With the second option, you can have all kinds of great business logic happening to render your information. Run off and talk to SAP, suck some data out of your corporate Oracle system, do some financial calculations, whatever. Then fire it off the web page all nice and neat for the user. Problem is that I can't find any !%@#$%$# way to find a happy balance between the two.

          What if you want to aggregate across multiple types of items or items that don't exist in a single library or list (like a domain collection)? Let's say I have 500 sites under a portal and each one has a Task list on it (we'll assume they're all from the same site definition). I write a web part to recurse through all the sites, grabbing the task list and finding all tasks assigned to Me and want to display them in my custom web part, with filtering, paging, sorting, etc. that the ListViewWebPart provides (assuming I have a list to point it at). I can't because I have nothing to point the listview at. Unless I create a new list on the fly (ugh) and populate it, but that's just plain ugly.

          ListViewWebPart would be nice to inherit from then specify your own data source (overriding the GetData method). However pretty much all of the classes in Microsoft.SharePoint.* are sealed (except for WebPart) so that's the only thing you can inherit from. For example, when you drag a web part onto a page, SharePoint will use the ListViewWebPart from it's arsenal to give you all those features people want (sorting, filtering, etc.). However you can't inherit from ListViewWebPart, only WebPart. The DataView Web Part is the same. I have to point it at a data source. Grant you it's a little easier because you could point it at a web service and have your web service do the heavy lifting, but still it's not very elegant or easy for that matter and I've never seen anyone do it.

          Anyone have any insight into how to bridge what I think is a gap here? While you can't inherit from a ListViewWebPart or a DataViewWebPart, you can construct them in your custom web part. Problem is you're still stuck having to point them at a physical source of information rather than a collection of domain objects.

        • .NET eBay consultants auction and the Tsunami Victims

          Thought this was a great thing for people looking to get some expert .NET help and help out the Tsunami relief (why is Tsunami always spelt with a capital 'T'?).

          Julia Lerman and Stephen Forte have put together a unique .NET charity auction to help out. Thirty of the top consultants and trainers in the worldwide .NET community have come together to help raise money for an organization that is doing amazing and heroic disaster relief in Aceh Province, Sumatra, the hardest hit area of the Dec 26th Tsunamis.

          Bid for an hour of a .NET Celebrity Consultant’s time. Winners can pick the brain of a .NET Expert for an hour (highest bidders will be first in the “draft” for the consultant assigned to them). Winners can call, email or IM the consultant and use the hour to answer that nagging question, do a code review, or just get some general .NET advice.

          The participants are RDs, MVPs, and INETA speakers from all 6 continents and 12 countries and include:

          Michele Leroux Bustamante, Kimberly L. Tripp, Jonathan Goodyear, Andrew Brust, Richard Campbell, Adam Cogan, Malek Kemmou, Jackie Goldstein, Ted Neward, Kathleen Dollard, Hector M Obregon, Patrick Hynds, Fernando Guerrero, Kate Gregory, Joel Semeniuk, Scott Hanselman, Barry Gervin, Clemens Vasters, Jorge Oblitas, Stephen Forte, Jeffrey Richter, John Robbins, Jeff Prosise, Deborah Kurata, Goksin Bakir, Edgar Sánchez, Thomas Lee, J. Michael Palermo IV, Vishwas Lele, and John Lam.

          So how would you like one of these guys (or girls) come to your office, hang out, bring donuts, tell you everything about Visual Studio 2005 (breaking all kinds of NDAs in the process), try to convince you to use DataSets everywhere and that XML is the only language there is, do code reviews, help debug something nasty, convert your Java finance system to .NET, defrag your hard drive, organize your MP3s, or whatever. Check out the eBay auction site here.

          Sounds like fun to me, but then I was always kinda odd.

        • Text Files, Associations, and SharePoint

          There was a really interesting thread (that I'm sure isn't finished) in the newsgroups around .txt files and their somewhat odd behaviour opening in IE and not the associated program (Notepad for most of us peons). Here's the original message that sparked this thread:

          What is the story behind the .txt files being overlooked when it comes to document libraries?  Should all .txt files be converted to .doc files?  It's a pain having to open them into IE, then 'Save as' to the desktop, open them with notepad, edit them, save them back to the desktop, then re-upload them to the document library.  There is no version history with that method either. Why can't we open .txt files to an editor from within the document library?  Is there some way in SharePoint to change the association for .txt files from IE to some editor?

          I didn't think it had anything to do with SharePoint or document libraries at all. File associations are an Internet Explorer/Windows Explorer thing, not SharePoint. True, SharePoint does do a little extra (through some cleverly embedded Javascript and some obscure onclick tags) but for the most part, it just does whatever any other .txt file does when launched from IE. It opens it in IE.

          I did some digging and found a few things that may help:

          Microsoft KB Article:

          Lengthy Article on File Associations (and mentiones IE and Text Files):

          Contains "fixes" for file associations and includes one for text files:

          The last link *might* fix the opening of .txt files (I tried it but just seems to repair any .txt file association problem) but the other problem is that you can't get the Office like integration with Notepad for example. It just isn't there so you're never going to see Notepad have a task pane and Check in options like Word does. Nor are you going to see too many non-MSOffice products have this feature either. The entire Microsoft suite of products is something that continues to alter each other in behaviour and how say a Word document has new "features" when you open it from a SharePoint site rather than a hard drive.

          Some interesting stuff indeed. I did some digging and found a few more things.

          Okay, the Javascript I mentioned is the DispDocItemEx Javascript function (found in OWS.JS). If you look at how a SharePoint doclib displays it's files, it wraps a "<a href>" tag and assigns an onclick event with this for a Word document:

          <a href="document.doc" onclick="DispDocItemEx(this,'FALSE','FALSE','TRUE','SharePoint.OpenDocuments.2')">Word Document</a>

          Okay, fair enough. How about a text file?

          <a href="document.txt" onclick="DispDocItemEx(this,'FALSE','FALSE','FALSE','')">Text File</a>

          Hmmm. Different parameters and there's no last parameter. Looking at OWS.JS we find this:

          function DispDocItemEx(ele, fTransformServiceOn, fShouldTransformExtension, fTransformHandleUrl, strProgId)

          So the ProgId (the program to launch the file?) is something called SharePoint.OpenDocuments.2. Smells like COM or something but looking at the DispDocItemEx Javascript we find a call to a function StsOpenEnsureEx. Looking at this we find a LOT of code commented out! The commented out code contains this:

          //@if (@jscriptversion >= 5)
          //@            try
          //@            {
          //@                vstsOpenDoc = new ActiveXObject(szProgId);
          //@                v
          strStsOpenDoc = szProgId;
          //@            } catch(e)
          //@            {
          //@                vstsOpenDoc = null;
          //@                v
          strStsOpenDoc = null;
          //@            };

          Now my javascript is pretty rusty and this looks like a mish-mash of C# and various scripting languages but "new ActiveXObject(szProgId)" I recognize. Then I thought "okay, there's that KB article mentioned which is about downloading text files through an ActiveX object". Any connection?

          So, walk with me on this one, suppose the commented out code invokes ActiveX on the client (IE) and launches the appropriate client side program? Is this the missing link to get .txt files to launch with the association they have on the desktop?

          Also another thought is the order that .txt files are listed with their desktop associations. I looked at a few setups and default is that IE is first in the list, followed by others with Notepad mixed in there. Perhaps you can a) move Notepad higher up in the Association list chain [if there is such a thing] or b) delete IE as an association with .txt files altogether [who wants to open text files with IE]? Anyways, a few ideas around this mystery.

          Unfortunately I don't have the resources to dig into this so hopefully someone out there will confirm or deny this and share with the rest of the class. Any takers or am I completely off my rocker here?

        • Calgary MVPs

          Just a quickie for those that are feeling the global warming in our fine city (-30 to +6 in a few days, that's Calgary for you). In Calgary we currently have 6, count them, 6 MVPS. Here's the rundown:

          Blake McNeill (Windows Security)
          Jason Dunn (Mobile Devices)
          Daniel Mitchell (Exchange)
          Daniel Carbajal (C#)
          Bil Simser (SharePoint Portal Server)
          John Bristowe (ASP.NET)

          The last guy is a bit shady and I suspect really only knows about Microsoft Bob but I've included him here for completeness (actually he's the Microsoft Regional Director around here and a great guy but I have to get my digs in).

        • ASP.NET Whidbey Web Parts Framework

          As I get ready to introduce Visual Studio 2005, .NET 2.0 and a raft of other things to our organization (no easy feat), I'm spending more time focusing on the Web Parts Framework that .NET 2.0 has to offer and how it will empower your web developers with things that were done with gobs of coding in the past. Personalization, customization, and all that good stuff that we're used to in SharePoint can now be put in the hands of any ASP.NET developer. It's really powerful stuff and will help get us to a common framwork no matter what the application content is.

          Nikhil Kothari, a development lead on the ASP.NET team at Micrsoft, has an excellent post here on his blog about connectiing Web Parts together and provides a nice sample that hooks up a calendar with it's entries. No SharePoint needed (but the 20 .NET framework is). Also check out his article for an Introduction to Web Parts here on MSDN which gets non-SharePoint developers feet wet with what's coming and how this is going to change the way you think (and develop) ASP.NET apps.

          As we SharePoint developers know (and those using SharePoint), Web Parts are the cat's meow when it comes to cutomization and personalization so armed with that, you can really empower your web-based application users with powerful capabilities for next to nothing in development.

        • Merging and Managing Documents and SharePoint

          So here I was trying to figure out some ways to manage mutiple parts of documents stored in SharePoint and Word, IE, SharePoint, or some combination of the above are all behaving badly and causing me (and from the newsgroups, others) grief. After many cokes and munchies, I've updated the blog with some ideas around how to do this without shooting yourself in the head (and the gotchas I went through to discover this).

          The problem is to store say 10 (or some number) of different documents (potentially from different document libraries) in SharePoint and:

          1. Allow users to edit the various individual documents AND (here's the kicker)
          2. Send out a compilation of all of these documents into a single one AND (now it gets ever better kids)
          3. Track the changes made by someone external to document AND (final nail in the coffin)
          4. Merge the changes back into SharePoint (from say a copy of the document you sent out that came back as an email attachement).

          Okay, besides having lots of ANDs there are a few challenges here. Some are easy to solve, and some that are driving me batty.

          Problem #1. Store a number of different documents in the system, allow people to edit them, track changes, all that good stuff. Easy sleazy. Document library + Document + Word 2003 = Bob's your uncle. Boy, if only my job was this easy.

          Problem #2. Create a compilation of these documents into a single document and send them to someone for editing. Okay, not too much of a biggie. Lots of ways to create a compound document. This KB Article says to not useWord's Master Document feature with SharePoint. They're just not compatible. The work-around is to use the RD or INCLUDETEXT fields. There's a great article by Dian Chapman (I have a lot of respect for anyone who puts Bill Gates on their resume as a reference) here on how to use this. It took me a few minutes to realize the RD field (reference document) wasn't going to pull in my sub-documents but rather be a facility to create an uber table of contents across all of them. The INCLUDETEXT field lets you specify a URL to a document and will basically pull the contents in with some nice options (formatting is always a problem with lots of different sources). Since all documents in SharePoint are URL addressable, I was all set. It creates what looks like to a user a single document in a document library. Click on it and it launches Word with all your documents brought together. Nice. Great. Bundling it to send out is a bit of challenge since this is compound document is just directives to include the other documents. The actual document will try to retrieve the others, which is great if you have access to them but we need to create a real 500 page (or however big it is) document to send to someone externally. In any case, the document can be exported or something to create this.

          Like I said, this compound document isn't a document at all. It's just that original document you create with the INCLUDETEXT fields to go retrieve each sub-document. While it looks like a single document, it isn't but you can change this single document as if you're editing any regular document in a document library (no special codes or anything). Oh wait. Gotcha. Here's an image showing the setup:

          What the heck is going on here?

          So I open the compound document (indicated by A above), go down to page 50 (which happens to really be document B in Document Library 2), and merrily change the contents. Click File | Save and the typical Save dialog comes up (SharePoint aware). Any meta data on the document library will popup so I can enter this. Fantastic. However since the compound document isn't a copy of all my sub-documents, the changes must have been made in Document Library 2 right? Nope. Open the compound document again. Yup, the changes are there. Check the sub-document. Nothing. Flush the IE cache. Nope. 

          In the picture above, the compound document is A which looks something like this:

          {INCLUDETEXT "http://servername/sites/sitename/document%20library%201/doc1.doc" * MERGEFORMAT}
          {INCLUDETEXT "http://servername/sites/sitename/document%20library%202/doc2.doc" * MERGEFORMAT}

          One of the sub-documents is B which is what is being edited in the scenario above. However the B document doesn't get updated. For those that are still awake and keeping score:

          • Edit A (the compound document). B (one of the individual documents) is not updated.
          • Edit B. A shows the changes.

          Remember, A is just 2 fields pointing to other documents. There's really nothing to edit there. Editing B will show the changes in the compiled document but only after you do a Select All then Update Field (F9). Otherwise, A will continue to show that last time the fields were updated (took me a few coffees to get that straight this morning).

          Problem #3: Track the changes made by an external party. A couple of options here as Word has (and has had for awhile) a Track Changes option. You can password protect this option, but it's not hard to get past that. If you really want to secure the contents you need to drop in a Rights Management server and protect the document this way. Note: You'll need to expose your DRM server externally if you send a document out that has the contents protected and there's a whole bunch of things that have to be done with this (end users needing Office 2003, etc.) so it will take more than a click of a button to enable it but it's pretty slick overall once you get the infrastructure and processes in place.

          Anyways, without tracking changes (or not trusting if someone can bypass it as the other end) it's not too difficult if you keep a copy of the fully merged document you sent out. Word 2003 has some nice Compare features to show you what's changed no matter what options were enabled, overridden, etc. Again a caveat here is that you actually have to unprotect a document (if it's protected) before you can compare one document with another.

          Problem #4: Merge the changes back into the copies of the documents in the document libraries. And here's the rub. If you send the document out as a single (new) merged document, even with the ability to see where the changes happeed, how do you get any changes back into the various bits and pieces that made this thing up in the first place (without having your users jump through hoops editing large numbers of sub-documents individually).

          So, bottom line...

          1. You can use a compound document with SharePoint however you need to use the RD and/or INCLUDETEXT tags and not the Master Document feature of Word (see KB article above)
          2. Do not edit the compound document directly, instead edit it's parts and regenerate/update the compound view.
          3. If you have to send a compound document to an external editor, send them the parts and perhaps a read-only copy of the compiled set of documents (like a PDF). You won't be able to merge the compiled document into the individual parts

          Clear as mud now?

          Note: I keep reading this and parts of it still doesn't make sense, however I do think there might be value in putting together a coherent post/article on "How to Support Compound Documents in SharePoint" or something. Watch for this in a couple of days. We'll just pretend I was having a bad morning.

        • I am the king nerd god!

          After watching my refridgerator die a horrible death (along with it's precious cargo [goodbye pork chops!] and the 3 hour cleanup I had afterwards), I needed a diversion. Thanks to Bruce Johnson, I killed a few brain cells and discovered that I was 97% nerdier than everyone else. Okay, so not everyone else, but those that took the test. Nope, no cheating.

          I am nerdier than 97% of all people. Are you nerdier? Click here to find out!  

          I'm not sure if I should be happy or sad?

        • Making SharePoint easier with NAnt

          I came across Mads Nissen and his blog about using NAnt with SharePoint. I've been using NAnt for a couple of years now for Continuous Integration and automated builds of .NET projects. While MSBuild promises to come along and do all of what NAnt does (and more), it's awhile off and requires the 2.0 Framework (although there is a MSBuild Compatibility Toolkit) so for now NAnt is a nice substitute.

          The idea of adding tasks to NAnt to support SharePoint just gets me all giddy (doesn't take much does it?). Deploying web parts, doing Enterprise deployments of portals or multiple team site creation through a NAnt task sounds great. While SharePoint templates are great, they only address half the solution. You still normally have to go in and setup security (even with custom site definitions) and if there's any special customization to be done (like corporate branding or maybe adding web parts dynamically to sites based on content) then it's usually a day or so of tweaking and changing things, settings up site groups, etc. All could be nicely done by a set of NAnt tasks and even better a nice rollout task for those deployments that go sour and your environment management people want to know how long it will take to undo what you've done.

          So if you're a SharePoint developer or someone interested in getting into SharePoint and using NAnt, please check out the GotDotNet Workspace setup by Kris Syverstad and join in the fun. Thanks to Mads for getting me hooked up on this too!

        • SharePoint meet PHP. PHP meet SharePoint

          So here I was, wanting to update my personal site,, and give it some new features (especially after being hounded by a certain someone at work who shall remain nameless...). The problem was that my web host only provided PHP and MySQL based sites. I would prefer a .NET or even SharePoint site but I'm also a cheap-skate and like the rates I get now with my provider. Maintaining a website with lots of static content (like what I had) was so 2004 now and I didn't want to code my own PHP portal or content management system.

          I had played with PHP-Nuke a long time ago and read-up on how you can completely change the look and feel to the site with it's theming capabilities. PHP-Nuke had a lot of nice features out-of-the-box that appealed to me like full searching across the site, downloads, links, announcements, etc. Hmmm, sounds very much like SharePoint. All the kind of stuff I didn't want to bother maintaining with static pages. I began to think about the whole PHP-Nuke themes and thought, "how close can I get it to looking like SharePoint without changing the codebase?". This is the result so if you do a double take on the site, it's all PHP powered with no .NET in sight.

          PHP-Nuke bears a lot of resemblance to SharePoint (I guess all "portal" type software does, or maybe it's the other way around). The modules would make a good Quick Launch. Blocks seemed to have a Web Part feel to them. Search was there. All it needed was a visual overhaul and a few tweaks. After dissecting SharePoint for awhile and the DHTML it spits out, I grabbed some of the graphics and stylesheets from a default install of WSS and started on the new Nuke theme. A few days later, lots of tweaking of tables and pixels and telling PHP-Nuke all about these imaginary "ms-" classes, and my SharePoint theme was born for PHP-Nuke.

          I still have some work to do. Namely the modules list isn't quite right but it's close to SharePoints own Quick Launch and there are no dynamic menus to hide/show Nuke blocks (think Web Parts) like you can with SharePoint. I did track down some mods and add-ins that I'm trying out and I think I can get the Quick Launch menu 100% there and at least add the minimize option to each Nuke-block. Overall I'm pretty impressed at the level of customization achievable with a little PHP coding. There are a few small bits that are not 100% customizable (like the page title has that annoying "-" in it which I can get rid if I slightly alter every page, but I didn't want to touch the Nuke codebase).

          So if you're stuck like I was with running PHP on my webserver, drop by and take a look. You can download the PHP-Nuke SharePoint theme directly from here. Feel free to use it on your own PHP-Nuke site and claim back that SharePoint look and feel we all know and love.