Everything SharePoint and XAML

My continuous learning of SharePoint, XAML, Silverlight, Windows Phone 7, Windows 8, Office, VSTO, C#…

The file ‘xxx’ is checked out or locked for editing by someone else

Posted by Steve Pietrek on April 16, 2009

I have been building out a POC for a future project. To expedite feedback, the client asked for us to record the end-user experience. One of the areas I wanted to focus on was the process of collaborating on documents. This includes:

  1. Content approval
  2. Major versions
  3. Require check out before editing

After setting these options in Actions > Document Library Settings > Versioning settings, I also wanted to demonstrate the process of checking out a document, editing the spreadsheet in Excel, checking the document back into SharePoint. The client is also interested in saving the files to the local drafts folder so work can be done offline. Easy enough. I then went through the following process:

  1. Opened the site
  2. For the desired file, selected “Edit in Microsoft Office Excel” from the ECB.
  3. Entered my credentials in Excel.
  4. Made desired changes to spreadsheet.
  5. Saved spreadsheet.
  6. Closed spreadsheet and was prompted to check the document in. Selected Yes.
  7. Entered a version comment and WHAM!!!, I received the following error.

image

Now this is confusing to me. I logged in as user1 into SharePoint and entered user1’s credentials into Excel when prompted. So it thinks it is checked out to someone else. Very interesting.

I proceeded to discard the checkout and try again but was met with the same error. I was testing the process in my VM (Windows Server 2008) so I switched over to my host (Windows 7) and ran through the same process (calling into my VM). It worked!!! So what is different?

  1. Operating systems are different. Duh.
  2. They are both running IE 8.
  3. The IE8 settings are the same.
  4. Could it be a service difference? Compared services and saw one difference. The Windows Server 2008 client had the WebClient service enabled and the Window 7 client did not. Hmmm. I disabled the service and ran through the process. It now works!!!!

A few notes:

  1. The reason I had the WebClient service enabled was issues I was seeing with Excel Services and not being able to publish from Excel. Sigh.
  2. I was running into an issue a few weeks ago where my SPD workflow would not start when an item was created or changed. I was using IE7 at the time and upgraded to IE8 and the problem went away. It did work in Firefox 3.0 and IE6 (through IETester). Not sure if it was related or now.
  3. I am still running into issues where if I don’t check the document in through Excel, when I attempt to check the document in through the SharePoint UI, I receive the error “This document was checked out to your local drafts folder but the local copy could not be checked in to the site.”. (see full error below)

 

image

 

Guess it’s the price you pay for developing in a Server OS.

Advertisements

Sorry, the comment form is closed at this time.

 
%d bloggers like this: