Skip to main content

Give a little, get a lot

In the spirit of Christmas it’s time for giving and S.A. Architect is hoping you will give 3 minutes of your time to them. As I posted before Willy is leaving to join the Rangers team at Microsoft. This means that one of our community leads, if not THE community lead, will be in the midst of Microsoft evangelizing and high lighting issues which are specific to our region. However for him to be able to know what WE need, he needs you to tell him! Think of this as a rare opportunity to get your views into Microsoft! So please click HERE and complete the survey! For more details on the survey see Willy’s post.

For my co-workers at BB&D the same survey is available internally on the KB, so you have no reason not to complete it.

Clean landing page

I mentioned that your SharePoint site should be clean and simple and have search on it. Well what does that mean visually? Trust Michael O’ Donovan to provide the perfect screen shot in his last post, well actually not in his last post but in the attachments on his last post:

Clipboard01

This is clean (duh), it’s easy to use (people can find the content easily), search is there (and has focus because it’s in the centre) and it’s familiar (remind you of any search engines).

SharePoint Search Tips and Tricks

I thought I would share some tips and tricks for improving the search experience with SharePoint:

In any company you will have people of different backgrounds and skills using SharePoint, and one of the first issues is that search isn’t fine grained enough, and that users either don’t know or don’t feel comfortable with advanced search features to get it fine grained. To make “normal” search easier just add Faceted Search. If you are interested in what that is go and check out the site.

Next improve usage by lighting up SharePoint search to the browsers. Well what does that mean? It means that when you go to a website with a modern browser it “detects” the search functionality and allows you to add it to the build in search functions in your browser, so you can search the SharePoint site from your browser without even going to it first! It does this using an open standard called Open Search. To do this you first need to define an XML file which tells the browser what to do. Example:

Clipboard01

Really simple, basically just the name and the encoding. The magic is handled by replacing the tag in the URL ({searchTerms}) with what the user is searching for. That file needs to be uploaded to a location on the SharePoint site where it can be read by users. The next step is exposing it to the browsers, to do this you just need to add a line to the header tag in your master page:

   1: <link rel="search" type="application/opensearchdescription+xml" href="/search/searchdefination.xml" title="BB&amp;D Portal" />

Now the browsers will see the tag and light up the search facility! This is really helpful for improving adoption of search.

Next up it would be great to search multiple locations and you can thanks to a feature in SP 1 called federated search. Where your search query actually calls other web sites for results and places them in a special section of the site, defined by a web part. As I am personally interested in a lot of technologies I think it would be great to have federated search to: Wikipedia, Linux.Com, Java.Sun.Com, MSDN.Microsoft.Com and TechNet.Microsoft.Com, like shown on the left.

What you may notice is that MSDN already has support for federated search, but the rest don’t! So how do you get around that? Well Live.Com also does has support for federated search and it also has support for limiting results to a specific site. So all that is needed to do is to create a search provider configuration for live.com and limit it to the specified website. You can download the sample providers I created below:

Clipboard01

The last tip is to implement a very clean landing page for the site with a search box on it. As the new landing is cleaner and smaller than the it meant the initial feeling of SharePoint is it is that it is quicker and more responsive and so it also will improve adoption. To get the search box to search properly using just a tiny bit of HTML + JavaScript which looks like this (assuming you have a textbox with ID called query), this will create the button:

   1: <input type="button" width="100px" height="" value="Search" onclick="window.location='/pages/SearchResults.aspx?k='+document.getElementById('query').value+'&s=All%20Sites';">

Willy blasting off!

On Friday Willy publically announced his plans for 2009, which include him leaving South Africa to go and work for the big blue monster (aka Microsoft) in the rangers team! Before I get into my view on this, let me explain what the rangers are: A MVP (which Willy is) is selected from the community by the community and big blue as a expert/lead/guide in their field. They are the best of the best outside of Microsoft. The rangers are the internal version of MVP’s. They are the best of the best inside of Microsoft. It is a great honor and privilege and shows really how big an expert Willy is.

In short I am so happy for him and really jealous too, but in the short period I have worked with him I have not even scratched the surface of what he knows… so I am sad that I won’t get that on a day to day basis.

To Willy I wish you the best of luck and enjoyment in this new experience!

DTS to SSIS

I presented a high level session on SQL Server Integration Services (SSIS) this week with the focus on what’s new in 2008, and when and where to use SSIS. Less focus was given to the how because how is easy with SSIS but I did do 30min+ of live demo’s so that showed the high level how as well. SSIS is in it’s second version (2005 being v1) because before that in SQL 2000 and before DTS existed and I was asked during the session on how to migrate from DTS to SSIS. I stupidly mentioned that there was a third party tool but no Microsoft one, because in 2005 there wasn’t and the what’s new in 2008 doesn’t mention anything (1 + 1 = assumption… and you know where that gets you).

Skip forward two days and guess what Zayd the “Server Dude” finds by accident… a TechNet article on how to migrate. Not only showing the third part option but the NEW built in option in SQL Server 2008 which I said didn’t exist! Anyway if you are trying to move from DTS to SSIS then you have to check it out at http://technet.microsoft.com/en-us/library/cc768544.aspx

Slide.Show and SharePoint: Part III - Deploy and final config

This is a multi-part series. The other parts can be found at

In part II, I wrote about how to get the data out of SharePoint in a dynamic way using a custom ASP.NET web page which did the hard work for us. The last part of this series is getting that code to work on the SharePoint server. The first step is to create a folder on the server where you will put these files (available at the end of the post). This should be outside your SharePoint directory, something like c:\inetpub\wwwroot\addons would be a good place. Next you need to create a virtual directory on your SharePoint site in IIS which points to that folder. The defaults for the virtual directory will be fine, however from a safety point of view I would recommend it runs in it’s own application pool.

If you just created a ASP.NET application though and put it in there it would fail because the web.config file from SharePoint does some odd things. To get around that you need to few things to it. First clear all the inherited assemblies away (see line 6 below), this has the downside that all the defaults from the machine.config also disappear so you need to add the ones you need back (lines 7 to 13). Next you need to clear all inherited httpModules (see line 19) and lastly you need to increase the trust of this application to full (line 21). Since this is on a virtual directory this has the advantage that you are not messing with the SharePoint config and your SharePoint server will continue to run happily.

   1: <?xml version="1.0"?>
   2: <configuration>
   3:     <system.web>
   4:         <compilation debug="true">
   5:             <assemblies>
   6:                 <clear/>
   7:                 <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
   8:                 <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
   9:                 <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
  10:                 <add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
  11:                 <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
  12:                 <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
  13:                 <add assembly="ListMonkey"/>
  14:             </assemblies>
  15:         </compilation>
  16:         <authentication mode="Windows"/>
  17:         <customErrors mode="Off"/>
  18:         <httpModules>
  19:             <clear/>
  20:         </httpModules>
  21:         <trust level="Full"/>
  22:     </system.web>    
  23: </configuration>

That is really all the config you need for the application to run, however don’t forget the config for Slide.Show to run we looked at in parts 1 and 2.

Next up is briefly looking at how the application works. Firstly override render method of the ASP.NET page. In there I do a lot of validation of the inputs which are provided in the query string. This is also an opportunity to set defaults if certain values are not provided. Next, and very importantly, I set the output to be text/xml (this tells the client, in our case JavaScript what to expect). To do this I do:

   1: Response.ContentType = "text/xml";

Then I call the lists web service of SharePoint which returns the results, which are parsed and rendered to XML (I am unfortunately using XMLNode still when I wrote this, instead of the beautiful XElement stuff… but I digress) and to the screen using:

   1: Response.Write(outputDocument.OuterXml);

This XML is in the format Slide.Show expects and so it’s configuration system we setup last time can just use it! All of this gives us a real time integration into SharePoint with Slide.Show!!! :)

As promised the files are available for download. It has occured that the download gets corrupted for some reason, if that is the case I recommend using this download, which is compressed with 7-Zip. NOTE: I have not tested this beyond my own simple tests and your mileage may vary. If you have problems please post a comment here I and will respond.

The files also include the source if you are interested to see what late night coding after months of no coding produces (may not be my finest work… looking over it as I wrote this I felt the need to refractor grow).

SQL 2008 - Saving Changes Is Not Permitted

I was working on a database for some sample data a few weeks back using SQL Server 2008 for the first time. I initially configured the table in one way and decided to change it later, because I wanted to do something else with the data. However when I tried to save it I got the following message:

a1

As there was no data in yet, I wasn’t worried about tables being dropped and re-created so I needed to enable the option mentioned in the message. The option can be found in the options menu item (duh!) under Designers –> Table and Database Designers. You need to uncheck the option Prevent saving changes that require table re-creation and click OK!

a2

WinImage - Tidbits from the field

I have posted before about the great tool called WinImage and how I think it is brilliant! I have been using it on and off recently and decided to share some tidbits of information about it.

First is a minor annoyance when extracting from an image, the default option is set to Ignore Folders. This means that the content of the folder you selected gets extracted but no sub-folders. If you want to extract everything from your folder down you must select Extract with pathname. This should be the default option since it’s the one I use most of all, and I suspect most people will use. What is nice is that it does remember what you last used, but still that first time it is annoying cause you will forget.

a2

There is a plus on the extracting of files and that is the ability to Extract all files into the same folder. Which extracts all the files from the selected point down and any sub folders but does not create the sub folders. I haven’t ever needed it, but it’s nice to know there is an option there if I do need it.

The other cool feature when extracting is that an icon appears in the task tray which if you hover over it gives you a tool tip, which isn’t that cool. The cool part is the image grows based on how far it is to completed so you can glance at the icon and quickly see the progress without needing the tool tip. In the pictures below note the first icon growing:

a1  image a4

Windows Azure

Reading Paul Thurrott’s review on Windows Azure he mentioned that it is part of the Azure Services Platform or ASP! ASP is already used (twice) in the Microsoft domain for ASP (classic) and ASP.NET, which the non developer community do not understand are different, but it is also a TLA (three letter acronym) for application service provider… which is what Azure aims to be, and if someone at Microsoft actually thought the latter combination th

Willy reviews my LINQ session

Yesterday was the day of my first full day training session, where I took a class of smart people through LINQ! It was MUCH more tiring than I thought it would be, both physically and mentally but  felt it was a great session. I have yet to see my scores but I am hoping that it will be in the 90% from the verbal feedback I got. One of the smart people to attend was Willy who has gone and written a review on what was covered including source code! One nice thing is that the discussions brought up some more topics and that I have fine tuned the content last night so those coming to the next one (which still has a FREE community seat open, I think) will get a even more refined session!