Uri Extension Method: AbsolutePathNoFile()

How often do you want to determine the absolute URI from any url without the specific file reference and without the query string variables. This is especially useful in many SharePoint tasks.

Here is a little extension method that can do just that. Pop this in a static class and try calling it on your Uri object:

public static UriExtensions {

public static string AbsolutePathNoFile(this Uri theUri)
string retVal = "http://" + theUri.Host + (theUri.Port == 80 ? "" : ":" + theUri.Port.ToString());
for (int intCnt = 0; intCnt < theUri.Segments.Length-1; intCnt++) {
retVal += theUri.Segments[intCnt];
return retVal;

// somewhere else:

Uri u = new Uri(Request.Url);

Over and Out


Google Wave Is Here: But I have no Friends

I am online with the Google Wave beta. It is cool, takes a bit of getting use to. But this is NOT going to replace my normal email account anytime soon - This is no Tsunami. I do however hope it does replace my email account ASAP - Especially on my iPhone!

The most major thing I don't understand about Google Wave is: How can I message people that do not have Google Wave accounts? Wouldn't this be the obvious way to get other people on board (is this merely not happening because this is a VERY early preview version)? Right now I can't so this means I can't use it for much (start playing little violin here).

My main contacts did not jump at the chance to subscribe to the Beta so I am now sitting in an ocean waiting to catch a wave.

Stay tuned for Google Wave invitation give away. I have nominated 20 of my closest digital friends for Google Wave accounts and am waiting for google to lick the stamps.

And so goes the life of a surfer.

Over and Out.