Thursday 24 December 2009

(!) All conflicts resolved but no files checked in due to initial conflicts

A minor annoyance with VS2008 SP1 and TFS 2008 SP1 today when attempting a check in. Here’s the stack trace:

  • Delete a folder and a bunch of images from VS Solution Explorer yesterday (right-click, Delete)
  • Check in the deletion and explicitly check for the delete action for the relevant files during the check in process
  • Arrive this morning to do a final cleanup and make sure everything in the project was checked in before Christmas… hey, all those images are still wanting to be checked in!
  • Attempt check in from Solution Explorer (specify comment, work item as per our policy configuration); Resolve Conflicts dialog pops up with the message “(!) All conflicts resolved but no files checked in due to initial conflicts”. Try again… believing, from memory, I’d seen this problem before and a second check in attempt had solved it. Same deal.
  • Resume Conflict Resolution from File –> Source Control. Nothing found, “All conflicts resolved”
  • Attempt check in from Source Control Explorer window in VS; same deal.
  • Drop into the VS 2008 Command Prompt and navigate to the solution; tf checkin and tf resolve produce the same results as VS. tf checkin tells me “Conflict: The latest version of item $/… is deleted.
  • Try tf resolve . /r /auto:AcceptTheirs but the command tells me “There are no conflicts to resolve”
  • Confirm folder and images are definitely not present in either the project (via Solution Explorer) or the source control tree (via Source Control Explorer).
  • Get Specific Version with ‘Overwrite all files even if the local version matches the specified version’ option checked; no change to the project or file system; same error message on check in.
  • Undo Pending Changes… from Solution Explorer context menu. Success! Now I have nothing left to check in (any other files not involved in the deletion process were checked in separately) and TFS is tangle-free yet again.

Installing Live Mesh Beta on Windows Server 2008 R2

It’s never easy… the downloader doesn’t seem to work from the web or somesuch, or at the very least not with Windows Server 2008 R2; running locally spits out an error about local policy not allowing the installer to run.

To work around this, add a new key named Installer below

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\Installer

and then create a DWORD named DisableMSI. Set the value to 0.

In my case I’d already downloaded the installer so I ran it locally, no change to UAC, no reboot, no –force switch on the installer. I’m meshed.

http://msdn.microsoft.com/en-us/library/aa368304(VS.85).aspx

Ps. I deleted the key after install but it’s probably not necessary to do so.

errorData during SharePoint 2010 Products and Technologies Configuration Wizard

When specifying database settings for my new SharePoint 2010 beta farm, I came up against an error popup I’ve never seen before under 2007:

An error has occurred while validating the configuration settings.  An exception of type System.ArgumentNullException was thrown.  Additional exception information:  The errorData argument cannot be null or zero length.

Parameter name: errorData


M’kay. What does that mean?!? I wonder to myself.

Checking the application log revealed a critical error that set me straight:

SQL database login for 'master' on instance 'SP2010BETA' failed. Additional error information from SQL Server is included below.

Login failed for user 'SPDEV\Administrator'.


I’m trying a least privilege install and of was still logged in as the administrator, instead of the setup user (criminal); I configured the setup account as an admin during the SQL Server 2008 install but not the administrator account I was using.

Login as setup and I’m back on track. Of course,
by the sound of it, I shouldn't be doing least privilege in 2010.





Dirty Words (Michael Hanes) - blog.mediawhole.com mailto:info@mediawole.com

Monday 21 December 2009

SharePoint Saturday Perth Announced

The very first SharePoint Saturday event is coming up in the new year (early February). Check out the details here and submit your speaker submissions by 4 Jan:

http://www.sharepointsaturday.org/perth/default.aspx

See you there!

Wednesday 16 December 2009

Flushing the Blob Cache

Sean McDonough has a really comprehensive post on several options for flushing the MOSS 2007 blob cache. Worth a read if you’re in need:

http://sharepointinterface.com/2009/10/30/manually-clearing-the-moss-2007-blob-cache/

Inner exception details displayed instead of wrapper exception

Wrapping an exception using the Exception (string, Exception) constructor and throwing the new exception in place of the original isn’t behaving as expected for me today: ASP.NET 3.5 displays the inner exception message in its default exception display; I expected to see the wrapper exception message. Oddly enough, details pertaining to the wrapper are logged to the Application event log.

So this:

try {
// Setup to make something go wrong
throw new Exception ("Inner exception");
}
catch (Exception ex)
{
// Wrap the inner exception and throw
// a new exception instead
throw new Exception ("wrapper exception", ex);
}

spits out this (note both the message and source error clearly pointing at the inner exception line):

Inner exception

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: Inner exception

Source Error:

Line 18: try
Line 19: {
Line 20: throw new Exception ("Inner exception");
Line 21: }
Line 22: catch (Exception ex)

Despite what the message and highlighted code reveal, the stack trace does imply the wrapper exception was involved along the way.

[Exception: Inner exception]
_Default.Page_Load(Object sender, EventArgs e) in Default.aspx.cs:20

[Exception: wrapper exception]
_Default.Page_Load(Object sender, EventArgs e) in Default.aspx.cs:24 …

Adding a second try/catch to catch any exception of type Exception and inspecting the results locates the inner exception property where I’d expect it to be. Alternatively, “swallowing” the inner exception in the original catch block and throwing a new exception using the Exception (string) constructor does just that—no sign of the inner exception. I’ve additionally tried catching different types of exception (I was originally throwing ApplicationExceptions and catch Exceptions) and constructing my own exception classes with the same effect.

Maybe I’m missing something but this seems like pretty basic stuff and a few other vaguely related search results hint that I’m not alone with this one. Of course, I can always handle all exceptions myself to prevent anything killing the application but the current approach is convenient at the moment for debugging outside production where it’s less convenient to attach a debugger or check the event logs.

If you’ve got any ideas or have come across this yourself, I’d love to hear your thoughts!

Sunday 6 December 2009

The Keywords Meta Tag Doesn’t Matter

Every wondered if the major search engines still consider the keywords meta tag? Well most don’t and haven’t for a very long time. Here’s the latest from the search engine driving the majority of search-based traffic to your sites:

http://googlewebmastercentral.blogspot.com/2009/09/google-does-not-use-keywords-meta-tag.html

Manual keyword maintenance, automated keyword builders, and so on: goodbye and good riddance!

Wednesday 2 December 2009

TFS Screen Captures with Snagit

If you’ve been working with TFS and TFS Web Access (Team Plain) you’re likely aware the product is graceless about screen captures—a critical part to describing many types of bug.

With products like JIRA you can simply PrtScn and paste the resulting screen grab directly into their web-based interface; TFS offers nothing of the sort (maybe in 2010?) and you must use a third party tool to save out your screen shot and upload it to the work item as a file attachment.

I’ve seen a few attempts to write controls to make the necessary magic happen within the Visual Studio environment but that doesn’t cut it where the majority of TFS users interact with the system through a browser. I have yet to find a solution for the browser end but in my travels did today come across a free Snagit output from TechSmith that will attach a Snagit screen shot to a work item for users with Team System installed.

As an extra output, you simply Finish your capture to the Team System output and a new work item window appears so you can fill in the basics. It’s not web-based but does work quite well, dropping the screenshot under the File Attachments tab and it is free if you’ve already got Snagit installed (which isn’t free).

Failure serving a file with a percentage character in the file name

An unexpected 404 error cropped up today while attempting to serve an image file with a percentage character in the file name. Windows has no issues with percentages but apparently IIS or something else in the pipeline refused to serve this file. Interestingly, the '%' character URL-encodes as '%25'... go figure.