"Unhandled exception has occurred in a component..." when launching Management Studio

  • Ladies and Gentlemen,

    We have inherited the following scenario...

    2003 R2 (SP1) Standard x64 server running x64 SQL 2005 Standard SP1.

    I'm not exactly sure how long ago it started...but when launching Management Studio the error above is displayed and we are unable to connect to the server. We can connect remotely and do fundamental management...but not directly on the server which prevents updating packages etc.

    There is also a named instance installed on the box. I am not yet certain about the particulars (Not sure if it is the same version or not) as I have been unable to get connected. I just wanted to put a feeler out if anyone has encountered the error.

    Below is an excerpt of the error received when trying to launch Management Studio...

    See the end of this message for details on invoking

    just-in-time (JIT) debugging instead of this dialog box.

    ************** Exception Text **************

    System.DllNotFoundException: Unable to load DLL 'shfolder.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

    at Microsoft.Win32.Win32Native.SHGetFolderPath(IntPtr hwndOwner, Int32 nFolder, IntPtr hToken, Int32 dwFlags, StringBuilder lpszPath)

    at System.Environment.GetFolderPath(SpecialFolder folder)

    at Microsoft.SqlServer.Management.UI.ConnectionDlg.Personalization.get_SettingsDirName()

    at Microsoft.SqlServer.Management.UI.ConnectionDlg.Personalization.LoadFromDisk()

    at Microsoft.SqlServer.Management.UI.ConnectionDlg.Personalization.get_Instance()

    at Microsoft.SqlServer.Management.UI.ConnectionDlg.Personalization.GetCountByCategory(String category)

    at Microsoft.SqlServer.Management.UI.ConnectionDlg.LoginControl.InitFromLastUsedServerType()

    at Microsoft.SqlServer.Management.UI.ConnectionDlg.ConnectionDialog.DoOneTimeInitialization()

    at Microsoft.SqlServer.Management.UI.ConnectionDlg.ConnectionDialog.OnVisibleChanged(EventArgs e)

    at Microsoft.SqlServer.Management.UI.VSIntegration.ShellConnectionDialog.OnVisibleChanged(EventArgs e)

    at System.Windows.Forms.Control.WmShowWindow(Message& m)

    at System.Windows.Forms.Control.WndProc(Message& m)

    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

    at System.Windows.Forms.ContainerControl.WndProc(Message& m)

    at System.Windows.Forms.Form.WmShowWindow(Message& m)

    at System.Windows.Forms.Form.WndProc(Message& m)

    at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)

    at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)

    at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ************** Loaded Assemblies **************

    mscorlib

    Assembly Version: 2.0.0.0

    Win32 Version: 2.0.50727.42 (RTM.050727-4200)

    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

    ----------------------------------------

  • Reinstall the client tools in the server this problem will be solved.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

  • That's an operating system file... first showed up with IE5. Do you see a file by that name in C:\Windows\System32 where you are running SSMS from?

    K. Brian Kelley
    @kbriankelley

  • Thanks to each of you for you replies.

    I attempted un-installing/re-installing the workstation components to no avail.

    Ended up opening a case with MS. They had us run "Procmon.exe" and then run the sql client tools to see what was happening behind the scenes...

    Management Studio was trying to call the dll from "C:\Windows\SYSWOW64". It turns out it did not exist in that location. They had us copy it from C:\Windows\System32...that led to a different error (BadImageFormatException) that suggested it was trying to load a 64-Bit dll into a 32 bit process. They then provided us a 32 bit version of the dll...we copied it to that location and viola.

    Not sure what went wrong...but the issue is resolved.

  • Wow. (pun intended)

    I wonder what caused the file to disappear. That seems a bit unusual.

    K. Brian Kelley
    @kbriankelley

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply