Unhandled Exception Occured When Launching .exe

Jul 15, 2009 at 9:19 PM

First, this looks like a great tool that may save my hyde! Second, I am receiving the following unhandled exception when running the downloaded iTechnology[1].ListInstacesFix.exe file on several SP2007 servers... just thought I'd report this as I am now off to Plan B. Thank you!!

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

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at iTechnology.Tools.Sharepoint.SharePointHelper.FindListTemplates(SPWeb web)
   at iTechnology.Tools.Sharepoint.SharePointHelper.FindOrphanLists(SPWeb web)
   at iTechnology.Tools.Sharepoint.SharePointHelper.GetWebNode(SPWeb web, TreeNode treeNode, List`1& orphanLists)
   at iTechnology.Tools.Sharepoint.SharePointHelper.<>c__DisplayClass3.<BuildTree>b__0()
   at Microsoft.SharePoint.SPSecurity.CodeToRunElevatedWrapper(Object state)
   at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()
   at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
   at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param)
   at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode)
   at iTechnology.Tools.Sharepoint.SharePointHelper.BuildTree()
   at iTechnology.Tools.MainForm.MainForm_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(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.3082 (QFE.050727-3000)
    CodeBase: file:///c:/WINDOWS/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
iTechnology.ListInstacesFix
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Documents%20and%20Settings/a.iosportal/Desktop/iTechnology%5B1%5D.ListInstacesFix.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.SharePoint
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.6421.1000
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SharePoint/12.0.0.0__71e9bce111e9429c/Microsoft.SharePoint.dll
----------------------------------------
System.Web
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_64/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_64/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Microsoft.SharePoint.Security
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.4518.1016
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SharePoint.Security/12.0.0.0__71e9bce111e9429c/Microsoft.SharePoint.Security.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_64/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.DirectoryServices
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.DirectoryServices/2.0.0.0__b03f5f7f11d50a3a/System.DirectoryServices.dll
----------------------------------------
Microsoft.Office.Server
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.6420.1000
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Server/12.0.0.0__71e9bce111e9429c/Microsoft.Office.Server.dll
----------------------------------------
Microsoft.Office.Server.Intl
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.6413.1000
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Server.intl/12.0.0.0__71e9bce111e9429c/Microsoft.Office.Server.intl.dll
----------------------------------------
Microsoft.SharePoint.Search
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.6422.1000
    CodeBase: file:///C:/WINDOWS/assembly/GAC_64/Microsoft.SharePoint.Search/12.0.0.0__71e9bce111e9429c/Microsoft.SharePoint.Search.dll
----------------------------------------
msvcm80
    Assembly Version: 8.0.50727.3053
    Win32 Version: 8.00.50727.3053
    CodeBase: file:///C:/WINDOWS/WinSxS/amd64_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.3053_x-ww_EA198EAA/msvcm80.dll
----------------------------------------
Microsoft.SharePoint.Library
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.6421.1000
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.SharePoint.Library/12.0.0.0__71e9bce111e9429c/Microsoft.SharePoint.Library.dll
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.1 built by: SP
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


 

Coordinator
Jul 18, 2009 at 3:27 AM

I resolved the problem in v.1.1. I've used it on couple of environment and had not experienced such problem so far. However  in the new release (1.1) I added more logic in the method that is throwing the exception to prevent problems as the one that you've experienced. I think that in your case you have list instance that has a template id that can not be found in the database at all. In the general case when you redeploy a list template a new feature record is being created but there is still some information for the old one. Please try the new version and let me know if it works for you.