July 27, 2008

File downloaded from sharepoint document library replaces spaces in file name with underscores

I have been noticing for some time now, in several MOSS implementations, that spaces in filenames are replaced with underscores on file download/upload from SharePoint.  I was blaming this on SharePoint SP1, since I started to notice it around the time of that release, however this discussion on MSDN indicates Internet Explorer 7 is the reason.

To see the behavior, find any document in a SharePoint document library with spaces in the filename, or upload one.  Then download the document to your desktop - you can see that the underscores are added in the "Save As" window.

If you are working quickly and not expecting this filename change to happen, you would save the document to your desktop, make edits, and then re-upload it later.  Since you didn't actively change the filename, you would expect the document to save over the original in the document library.  This is the way SharePoint has traditionally worked.  But what you end up with is two copies of the document in the document library. 

Blog_file_name_with_spaces 

Disclaimer - I'm sure we can all agree that the best practice in general is to check out / check in your document rather than downloading it to your desktop.  (The underscores are not added during checkin/checkout.)  But what if someone else has the document checked out, and you can't reach them to ask them to check it back in, and you're under pressure to make edits right away?  Or what if you thought you were just taking a copy, but the edits you make on your desktop turn out to be the preferred version?    Or what if you haven't fully tested the offline sync capabilities of MOSS 2007, and you want to be absolutely sure the document is accessible when you're offline?  These and many other real-world situations could lead to this downloaded-file scenario, which could lead to multiple copies of the same or similar documents in your SharePoint environment, which is exactly what most of us are trying to avoid. 

The MSDN thread proposes a workaround, although I will argue that the adding of underscores is not necessarily a bad thing, expecially since SharePoint can cause problems when working with filenames that include spaces.  I think it's important to be aware of this download behavior and to work toward minimizing the multiple-copies effect - emphasize checkin/checkout vs. download in end-user training sessions, for example.


April 02, 2008

Best Practice - do not use dash or hyphen in SharePoint system account / server farm account name

We recently saw an issue at a client site where the client chose to use a dash, or hyphen, in the name for the server farm account (a.k.a. the database access account, a.k.a. the System Account) - e.g. "moss-admin."  The account worked until our infrastructure expert tried to create the Shared Service Provider - it hung for over 10 minutes, and when he checked the event log he found it flooded with errors to the effect that the user could not be found in the domain.  Once they went back and changed the account name to remove the dash, they were able to create the SSP without any issues.  Going forward we are recommending that as a best practice, you should not use any special characters (e.g. \ / : * ? " < > | # { } % ~ & - _ . , ) in the server farm account name.