Home | Blog | Screencasts | Projects
# Friday, October 17, 2008

I wrote about setting Microsoft Search Server 2008 Express up and configuring it to index a web site, the search interface that I demonstrated was a standard SharePoint site based on the Search Centre Template. I thought it would be nice to show how easy it is to build your own search interface.

I think the big appeal about Microsoft Search Server 2008 Express is that it can be used without the full overhead of SharePoint. So with that in mind and the fact that I’m unhealthily in love with the MVC framework, I’ve put together a simple ASP.NET MVC sample that works with the search server:

 

The screen cast shows the sample application as well as an overview of the code:

 

 

The thing that is really appealing is that by using the ASP.NET MVC framework, you have complete control over the generated HTML, there is no nasty webpart hidden fields or the hideous viewstate.

I hope you come away with the idea that Search Server would be perfect for indexing your website or file shares etc, but that you ultimately have the power to present those results how you see fit.

 

You can download the source code to my sample application here. It makes use of the MVCContrib library for the pagination support and preview 5 of the MVC framework.

A list of all the default columns that are returned by the search web service can be found here:

  • WorkId
  • Rank
  • Title
  • Author
  • Size
  • Path
  • Description
  • Write
  • SiteName
  • CollapsingStatus
  • HitHighlightedSummary
  • HitHighlightedProperties
  • ContentClass
  • IsDocument
  • PictureThumbnailURL

If these don’t provide what you need then you can use the other enterprise search schema’s.

Friday, October 17, 2008 8:47:06 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [1] - Trackback

# Thursday, October 16, 2008

By default SharePoint will create a content source called ‘Local Office SharePoint Server sites’ such as:

 

contentS

 

This will contain the starting addresses of all the sites on your SharePoint server such as:

editContentS

 

Notice how it also includes the sps3://, this is the indexing of your user profiles.

 

My tip is to remove the sps3:// link from the default content source and add it as a new content source on it’s own.

 

The reasons why I think this is helpful:

  • By default you need to crawl all your other content just to update your user profile information.
  • You can schedule your profile crawls at a time that suits your active directory imports

In any case it’s worth considering breaking the profile crawl into it’s own content source.

Thursday, October 16, 2008 10:55:00 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Search | Sharepoint | Tip

I’ve put together a screencast that carries on from my previous post on installing and configuring Microsoft Search Server 2008 Express.

This screencast covers:

  • Setting up a new external content source (my example is this indexing this site)
  • Viewing the crawl log to determine the success or failure of a crawl
  • Adding a search scope to give the end users the option to focus there search query to a particular area
  • Enabling the search scope in the site collection
  • Setting up the search centre page web parts to show the search scope dropdown

In the screen cast I mention that the navigation links in central admin or the search administration don’t link to the search scopes settings page. I manually added the url:  http://<server-name>/ssp/admin/_layouts/viewscopes.aspx?mode=ssp

 

The higher quality screencast can be found here or the youtube version:

Thursday, October 16, 2008 7:36:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Screencast | Search Server
# Wednesday, October 15, 2008

You may not have heard about Microsoft Search Server 2008 Express, just as SQL Server Express is the little brother of SQL Server, Search Server 2008 Express is the little brother of MOSS. It offers most of the enterprise search capabilities of MOSS minus the BDC.

I’ve put together a screen cast of the install and initial setup of the product, you’ll find that the entire process is almost the same as WSS or MOSS, that is because the product is built from the same components. The one notable difference is the new Server Wizard page, it combines all the common settings such as app pool accounts, selection of the index server, content access accounts into one place.

The search administration is the same as MOSS with the infrastructure updates, in fact the infrastructure updates goal was to align the work done around the Enterprise Search Server space with the search capabilities of MOSS, new features like federated search etc.

 

I highly recommend taking a look at Search Server 2008 Express if you want to provide search to your organisation without the committing to a full MOSS install or even to increase the search capabilities of your WSS farm.

 

The install steps are:

  • Launch the installer, make sure you select the ‘Install all components’  from the advanced option if you wish to connect to a SQL Server, otherwise the stand alone option if you wish to use the SQL Express version.
  • The configuration wizard will run after the install (just like SharePoint), depending on your option, I choose to create a new farm.
  • Enter your database server name and the database access account, this account should have permissions to create databases.
  • Specify a port for central admin to run on, try to make this consistent across all your farms, it makes it easy to remember that way.
  • Once the setup completes, central admin will be launched, a page specific to Search Server will be presented. This page will ask for the content access account, the application pool account and various other options. I really like this consolidated page, hopefully we will see more of it in SharePoint 14
  • In my case the web application was created successfully, however the site collection wasn’t created, so I selected the create site collection option in central admin and used the search centre template.

 

The higher quality screen cast can be found here or the youtube version:

 

Of course you should also subscribe to the Microsoft Enterprise Search Blog to help stay up to date with this product.

Wednesday, October 15, 2008 7:27:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Screencast | Search Server | setup
# Tuesday, October 14, 2008

So the big news is that Silverlight 2 has been released, I haven’t really paid much attention to Silverlight up until the Devsta competition which gave me the incentive to jump right in and start developing with it.

I remember on the first day of development of Console Connect I was really frustrated that I couldn’t get the exact layout of UI elements that I wanted, I hadn’t fully understood the power of the StackPanel. Once I got over that hurdle I found myself applying the same text styles to numerous textboxes which didn’t feel right, then I discovered the shared resources, by now the light was on and I was lovin it.

I was really impressed by how easy it was to pick up, I don’t recall having any problems at the code level, just the UI issues I previously mentioned. Within a week I had a couple of small games working and could do all the same things that I could in a winforms app like calling webservices and changing the UI in response to the users input. If I was a little more graphically inclined, my games could come to life with animations and sounds, but that is best left to those right side of the brain people.

One of my colleagues said to me that he didn’t think that Silverlight would get much widespread adoption, but my thoughts after having a good play with the technology are a little different.

I think the key is the shallow learning curve for .NET developers, something like this: 

 

Silverlearningcurve

 

Once you get over the little UI hump (which is basically the same for WPF) and learn a handful of things like data binding, resources and the way the UI can use panels, your just about at the top of the curve. I think Scott Hanselman had much of the same experience when started on his babysmash experiment.

So ultimately I think the success of Silverlight will be around the fact that developers can pick it up quickly and experience all that developer love from Microsoft. All the things that make development a breeze like a full debugger, intelli-sense and a framework that is familiar.

 

Or maybe I’m completely wrong and the rest of the world will have the same view as Ruby On Rail’s David Heinemeier Hansson who basically thinks that we are only scratching the surface with what can be done with Javascript and HTML, maybe rich internet applications will be a passing fad?

Tuesday, October 14, 2008 11:01:00 PM (E. Australia Standard Time, UTC+10:00)  #    Comments [1] - Trackback
Silverlight

I previously blogged about using the BDC with MOSS user profiles and how to set that whole process up. Well I thought that I might write a little about the BDC application definition file (ADF) that is imported into MOSS and is used by the BDC to generate the meta-data and to ultimately connect to the data source.

An ADF file contains metadata describing entities and methods to populate those entities.

These are the methods that are of interest to us, all have nice relevant names:

 

IDEnumerator – These methods can perform filtering and can be passed parameters, the idea is that it returns an ID (and a timestamp if possible), as it’s name implies it is used to enumerate all the ID’s (or primary keys). In the context of the profile import, if your key is say, an Active Directory email address, then the IDEnumerator should return the email address field.

Specific Finder – This method accepts an ID and returns just the information related to that ID. You’ll probably create a number of these using different filter descriptors.

 

Now that you have an idea of what the methods are and how they operate you can design web services that are low friction for the BDC.

You’ll need a web service that returns a list of ID’s (for the IDEnumerator), you’ll need a second webservice that accepts the same ID’s that were returned by the first method, this second method will comprise your Specific Finder methods.

Also don’t create trouble for yourself by building webservices that accept a large number of parameters, you’ll regret it, just keep it simple. The guys that developed the fantastic BDC Meta-Man product also have the same advice.

 

I’ve provided the SQL create statement and ADF file here.

Tuesday, October 14, 2008 9:05:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
BDC | code | MOSS
# Monday, October 13, 2008

I’ve put together a screencast that demonstrates how to configure a web application so that it can host MOSS MySites.

 

The basic steps are:

  • Create the web application
  • Create a site collection to be hosted in the newly created web application, make sure this is based on the ‘My Site Host Template’
  • Create a managed path for the MySites
  • Change the MySite settings in the SSP central admin to reflect the URL and managed path that was setup in the previous steps
  • Enable self service site creation so that new MySites are created when the user clicks on the My Site link

The high quality version can be found here or the youtube version:

 

Monday, October 13, 2008 7:48:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
configuration | MySites | Screencast | Sharepoint
# Friday, October 10, 2008

One of the main features of SQL Server 2008 is database backup compression. In SQL 2008 you can now specify the backup as:

BACKUP DATABASE ‘WSSDatabase’

TO DISK = ‘C:\WSSDatabase.bak’
WITH COMPRESSION;

Or if your GUI inclined:

SQL2008Compression

 

This will make managing your content databases a little easier, especially if your already getting heckled by your SAN Administrator or the poor guy trying to backup those 150GB backups.

 

The second feature is Transparent Data Encryption (TDE), this allows you to specify a key that is used for data encryption for example:

ALTER DATABASE ‘WSSDatabase’
SET ENCRYPTION ON;

The scenario where I think this feature works nicely is this; imagine your pay-role people want to store pay details, you could firstly ensure that the site collection they use is located in a nominated content database, then you could turn on the encryption and have another secured means of protecting your data.

 

Further information can be found here.

 

Those two features are pretty compelling, on all our new deployments we are recommending SQL 2008.

Friday, October 10, 2008 8:45:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Sharepoint | SQL 2008
# Thursday, October 09, 2008

I’ve put together a screencast that shows how to use your data from an external source such as a SQL Server database and combine it with your user profiles.

The screencast shows how to:

  • Import the application definition to setup the BDC application
  • Setup a custom import connection of type business data catalog and how to set the key between active directory account and BDC data
  • Setting up custom profile property section (the example is cricket statistics)
  • Setting up custom profile properties that import data from the BDC data source
  • Start a full import
  • Perform a search which returns the user and show the new data that is displayed in the users profile page.

A good quality version of the screen cast can be found here (4 mins).

 

Or the low quality youtube version:

 

Thursday, October 09, 2008 11:01:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [1] - Trackback
Screencast | Sharepoint | BDC
# Wednesday, October 08, 2008

The question was asked:

How do I load up an XSLT from the style library like:

 

   1: XslCompiledTransform xslTransform = new XslCompiledTransform();   
   2: xslTransform.Load("/styles/file.xslt");  

 

When I do this I get a (401) unauthorized exception

 

Answer

You need to use an XmlUrlResolver and populate the credentials property like:

   1: XmlUrlResolver resolver = new XmlUrlResolver();   
   2: resolver.Credentials = CredentialCache.DefaultCredentials;   
   3:   
   4: XsltSettings settings = new XsltSettings(true, true);   
   5: transform.Load(XSLTUrl, settings, resolver);  

Wednesday, October 08, 2008 10:37:00 AM (E. Australia Standard Time, UTC+10:00)  #    Comments [0] - Trackback
Q&A | Sharepoint
Statistics
Total Posts: 191
This Year: 0
This Month: 0
This Week: 0
Comments: 41