Paul Liebrand's Weblog

Welcome to my blog mainly about SharePoint

Skip to: Content | Sidebar | Footer

Photography

24 July, 2010 (21:26) | Personal, Photography | By: Paul Liebrand

I decided to create another blog that is dedicated to one of my hobbies – photography. Over the next few weeks I’ll be uploading some highlights from over the last few years that I have been doing it. Some of the photos I have upload so far include my adventures at some SharePoint conferences (featuring Steve Ballmer, Tom Rizzo, and Huey Lewis and the News), my first wedding, some 4th July fireworks shots and many more.

Collage

Please take a moment to check it out and feel free to leave a comment. Check back often as I add more.

http://photography.paulliebrand.com

Thanks!

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

Simple Pattern / Solution for Cross-thread operation not valid

16 July, 2010 (10:54) | .NET | By: Paul Liebrand

If you have ever done any threaded programming in .NET WinForms you have more than likely run into the following error message at some point:

Cross-thread operation not valid 

InvalidOperationException was unhandled

Cross-thread operation not valid: Control ‘’ accessed from a thread other than the thread it was created on.

This exception is normally displayed while running in DEBUG mode. In release mode, everything appears to run as expected but at some point you will definitely run into a thread deadlock issue.

The following code represents a pattern I would use to get around this problem and I insured all the calls that would touch the UI from a different thread followed it:

 
private void button2_Click(object sender, EventArgs e)
{

    ThreadPool.QueueUserWorkItem(notUsed =>
    {
        for (int i = 0; i < 100; i++)
        {
            UpdateStatus(string.Format("Loading record {0} of 100", i, 100));
        }
    });
}

private void UpdateStatus(string message)
{
    if (InvokeRequired)
    {

        BeginInvoke((MethodInvoker)delegate() { UpdateStatus(message); });
        return;
    }

    textBox1.Text = message;
}

Although this pattern works it is not as elegant and can be further refined and simplified. To accomplish this I created an extension method for the Form as such:

    public static class FormExtensions
    {
        public static void HandleCrossThreadUI(this Form form, MethodInvoker code)
        {
            if (form.InvokeRequired)
            {
                form.BeginInvoke(code);
                return;
            }

            code.Invoke();
        }
    }

By modifying the original code above to make use of the extension I can simply the code a little further:

private void button2_Click(object sender, EventArgs e)
{

    ThreadPool.QueueUserWorkItem(notUsed =>
    {
        for (int i = 0; i < 100; i++)
        {
            UpdateStatus(string.Format("Loading record {0} of 100", i, 100));
        }
    });
}

private void UpdateStatus(string message)
{
    this.HandleCrossThreadUI(() => { textBox1.Text = message; });
}

This may not look like much but when you start adding more and more code, it becomes a lot easier to read.

Hopefully you find this a little useful.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

Project Server 2007 “Error: ActiveX component can’t create object” when building Cube

16 June, 2010 (09:23) | Project Server 2007 | By: Paul Liebrand

We recently received the following error message when we attempted to build the cube within Project Server 2007:

Failed to build the OLAP cubes. Error: Analysis Services session failed with the following error: Failed to connect to the Analysis Services server <server>. Error: ActiveX component can’t create object

TechNet has an article (http://technet.microsoft.com/en-us/library/cc197608(office.12).aspx) on this specific error message that basically says you need to make sure you have the SQL Server 2005 Analysis Services components installed on the Project Server application server.

  • Microsoft SQL Server Native Client (sqlncli.msi)
  • Microsoft SQL Server 2005 Management Objects Collection (sqlserver2005_xmo.msi)
  • Microsoft SQL Server 2005 Backwards Compatibility Components (SQLServer2005_BC.msi)

Strange thing was we already had these components installed.

After troubleshooting the issue we determined that the DBAs installed a newer cumulative update on the SQL Server but the components where never updated in the Project Server 2007 environment.

Grabbing the updated components from the matching CU and upgrading those on the Project Server 2007 environment resolved the issue.

Just wanted to share in case anyone else runs into this specific scenario.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

Document is locked for editing – Part 2

12 April, 2010 (11:02) | Office, SharePoint | By: Paul Liebrand

In 2008 I made a post about the infamous “locked for editing” message many people experience while using Office with documents stored in SharePoint. This post addressed the issue that can occur outside the normal “locking” mechanism Office and SharePoint.

I recently had a problem where I attempted to edit an Excel spreadsheet and I was presented by the following message:

File in Use

Being a good SharePoint citizen, I waited about 20 minutes to give SharePoint the chance to unlock this file. Even using the Notify feature of Excel, I never received a notification saying it was available. I decided to follow the steps outlined in my other post on this topic. So I navigated to the Content.MSO directory, cleared it out so it was empty and tried to open the file again via SharePoint. To my surprise, I received the same message.

I was 100% sure that nobody else had this file open so I began investigating further. I ran a filemon on my computer as I was opening the file and saw it was attempting to read and write a file located under C:\Documents and Settings\<user>\Local Settings\Temporary Internet Files\6WBGVSLW\UKYNMWF7\Offline\e

I navigated to this folder and saw this:

4-12-2010 10-51-34 AM

I deleted all the content in this folder and attempted to open my document again and sure enough it opened successfully. This was the first time in the many years I have worked with SharePoint that I ran into this location.

I went to another computer and saw that the folder name after “Temporary Internet Files” was different. If I deleted this folder and opened the document again, the exact same name was created.

After some more research I found a registry key that is used to identify this location:

4-12-2010 10-55-56 AM

HLCU\Software\Microsoft\MSDAIPP\CacheFolderId

This value will identify the location on your computer since it will be different for everyone. The offline folder appears to be a special hidden folder so you might have to key it in manually once you have reached that destination.

For more information on what MSDAIPP (Microsoft Data Access Internet Publishing Provider) is, check out this Wikipedia article.

There still seems to be no idea what causes this problem to happen. Maybe it’s network error or a bug in one of the products – who knows! Regardless, this is just another location you might need to check to release the “locked by another user” error that so many people seem to get.

Hopefully this helps.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

Devon and Christina – Almansor Court, Alhambra

5 April, 2010 (19:13) | Personal, Photography | By: Paul Liebrand

Wedding1

Devon and Christina’s wedding was the very first wedding I have ever been hired to shoot. As an aspiring photographer I was extremely nervous but they had the confidence in me to pull it off. Without a doubt, this was the most stressful photo shoot I have ever done but I think it all came together at the end. I still have much to learn both around my camera and shooting weddings in general.

Wedding2

Wedding3

Wedding4

Wedding5

We were able shoot Devon and Christina this close without them seeing each other before the wedding. It was amazing!

Wedding9

Wedding6

Wedding7

Wedding8

Congratulations to both of you and thank you again for this opportunity. I’ll never forget it.

Wedding10

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

Project Server 2007 and SQL Server 2008 Analysis Services Issues

3 March, 2010 (09:42) | Project Server 2007, SharePoint | By: Paul Liebrand

I ran into an issue attempting to get Project Sever 2007 working with SQL Sever 2008 Analysis Services and thought I would create a post about it in case other people are experiencing the same issue.

The first thing to note is the article on TechNet are written as if everything is installed on the same server; that is not the case in my environment. High level overview of my environment:

  • SharePoint Farm
  • Distributed SQL Server 2005 (stores SharePoint DBs and Project Server 2007 DBs)
  • Distributed SQL Server 2008 Analysis Services (for Project Server 2007 cube)

The second thing to note is that the instructions for using SQL Server 2008 Analysis Services specifically call out installing the following components from the Feature Pack for Microsoft SQL 2005 – December 2008 (in this order):

  • SQL Native Client
  • Microsoft SQL Server 2005 Management Objects Collection
  • Microsoft SQL Server 2005 Backward Compatibility Components

Following these instructions to a tee I received the following error message when attempt to build my cube:

Failed to build the OLAP cubes. Error: Analysis Services session failed with the following error: Failed to connect to the Analysis Services server <<SAS Server>>. Error: Cannot connect to the repository. Analysis server: <<SAS Server>> Error: Provider cannot be found. It may not be properly installed.

According to the troubleshooting guide at the bottom of the article this means I do not have the right version of the client installed. Very baffling – I installed everything straight from the links provided in the article.

Next I decided to create the cube against a SQL Server 2005 Analysis Service to see if I had any different results.

Upon creating the cube, I received the following error message:

Analysis Services session failed with the following error: Failed to connect to the Analysis Services server <<SAS Server>>. Error: Cannot connect to the repository. Analysis server: <<SAS Server>> Error: SQL Network Interfaces: Error getting enabled protocols list from registry [xFFFFFFFF].

I did a little searching with the help of a co-worker and I was able to resolve both these issues.

Solutions

1. Error: Provider cannot be found. It may not be properly installed.

This issue was resolved by installing the SQL 2008 Native Client on the Project Server 2007 server. Yes, the SQL 2005 Native Client, 2005 Management Objects Collection, and 2005 Backwards Compatibility Components are still needed.

2. SQL Network Interfaces: Error getting enabled protocols list from registry [xFFFFFFFF]

This issue was resolved by making the following registry change on the Project Server 2007 server.

Locate the following registry key:

HKLM\Software\Microsoft\MSSQLServer\Client\SNI9.0

And for the ProtocolOrder entry should be set to:

tcp
np
sm

Reference: http://serverfault.com/questions/53915/sql-server-2005-error-getting-enabled-protocols-list-from-registry-xffffffff

I hope this helps anyone else that struggled with this.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

SPoint.me “The SharePoint Social Network” has arrived!

2 March, 2010 (20:23) | SharePoint | By: Paul Liebrand

I would like to assume many people have heard of the SharePoint related site called SharePointMagazine.net, brought to us by Arno Nel (@arnonel). The SharePointMagazine.net site has a tremendous amount of great content from many guest authors and you should check it out of you have not already.

So why this blog post? Well Arno has done it again! Today he announced SPoint.me, The SharePoint Social Network. This social networking site takes a little bit of each of the social network sites we use today (Twitter, Facebook, Linked In, etc.) and combine them together into one with the focus being everything SharePoint.

SPointHeader

Some of the features SPoint.me offer include:

  • Blog hosting
  • Groups
  • Forums
  • Twitter integration (Facebook soon!)

The only real downer I have found so far is the inability to connect my existing blog to my profile page. I am sure its in there and I am just overlooking but that is a minor detail. (UPDATE: This has been resolved – there is now a Social section under your profile where you can fill this information out)

I posted a comment today on SPoint.me about wanting an iPhone application and apparently one is coming soon (or at least an announcement) (within 1-2 weeks).

With it only launching today and having over 200 members already is a promising sign. I strongly encourage the SharePoint community to sign up for this social network and give it a whirl. Hopefully it stays strong and continues to grow with great new features.

Great job Arno (and anyone else that helped you bring this to fruition) and check out my SPoint.me profile page!

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

My ClusterShot Photo Store

20 February, 2010 (11:45) | ClusterShot, Personal, Photography | By: Paul Liebrand

clustershot-logo I came across a service called ClusterShot a few months ago that gives photographers an outlet for selling their photos. The service allows a photographer to set a price but also accept offers. With the ability to import photos from other services such as RSS and Flickr it made it real easy for me to bring my photos into the service.

ClusterShot can be used for free with some limitations. I recently decided to upgrade my account to PRO status which gives me a “store front” and allows me to feature particular photos right on the landing page of my store. For $20 bucks a year it is not a bad deal.

ClusterShotStore

The PRO account gives access to features such as statistics and watermarking.

I am not sure I will actually sell any photos but I decided to give it a shot.

If you are interested, feel free to check our my ClusterShot photo store at http://paulliebrand.clustershot.com. I have a few select pictures in there now and will expand it over time.

Thank you for your time and support.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

My friend IDrive

14 February, 2010 (13:15) | Tools | By: Paul Liebrand

ide_logo A few years ago after I experienced numerous hard drive failures and almost losing my entire photo collection I decided to invest in an online backup strategy. After evaluating a few options, I decided to go with IDrive and I have been extremely happy.

It costs about $4.95 per month for 150 GB of storage. One thing to note is that each file can have up to 30 different versions and the versioned files do not count against your storage limit.

The versioned files saved me a few months back when my hard drive become corrupted and all my photos were backed up in a corrupted state. I used the time-line restore feature to restore all my content to a point in time when I knew the files were good.

I basically set it and forget it and I know my photos and documents are safely being backup nightly.  They also have an option for continuous backup so as a file changes it automatically backs it up immediately.

ide_rapidserve_imgFor those of you that do not want to upload all your content the first time, they also offer a service called  Rapid Serve. For $69 a portable IDrive will be shipped to you and you can fill it up with all your content and send it back to them. Once they receive your portable IDrive all the content will be associated with your account.

The following is a overview of their features:

  • Automatic Selection
  • Continuous Data Protection
  • True Archiving / Sync
  • Open / Locked File Backup
  • Mapped Drive Backup
  • IDrive Explorer
  • Search and Restore
  • Time-line restore
  • Versioning
  • Retrieve from any location
  • Web based backup management
  • Enhanced security with 128-bit SSL encryption on transfers, 256-bit AES encryption on storage with a user defined key that is not stored anywhere on IDrive server.

I cannot recommend IDrive enough to anyone who wants to keep their data safe and offsite.

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit

“Accidentally on Purpose” by Swift Dixshun

5 February, 2010 (20:38) | Music, Personal | By: Paul Liebrand

AOPCDComplete1 Swift Dixshun recently released his latest hip-hop album, “Accidentally on Purpose.” Why do I care? Although I am not the biggest fan of hip-hop, this album has some personal significance to me. My younger brother, Mark Liebrand, produced 2 songs and recorded about 6 others from this album.

This is a momentous accomplishment for him and if you are in the least bit interested in hip-hop or simply want to support their movement, check this album out!

You can follow my brother on Twitter @dsproductionz and his website is http://www.darksideproductionz.com

The album is available on iTunes, Napster, Amazon MP3, MySpace Music, LimeWire, Lala, Nokia, Rhapsody and also at www.swiftdixshun.com.

 

Congratulations to you on this release!  Cannot wait to see what you do next

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit