I'm having a strange problem, I have a small executable that runs a
backup for a some data nightly, and as of September 22, 2007 it has
ceased to function with the following error:
Unhandled Exception: System.TypeInitializationException: The type
initializer for "System.Threading.Thread" threw an exception. --->
System.ArgumentOutOfRangeException: Load factor needs to be between
0.1 and 1.
Parameter name: loadFactor
at System.Collections.Hashtable..ctor(Int32 capacity, Single
loadFactor, IHashCodeProvider hcp, IComparer comparer)
at System.LocalDataStoreMgr..ctor()
at System.Threading.Thread..cctor()
--- End of inner exception stack trace ---
Source code is as follows:
Option Strict On
Imports System
Imports System.Diagnostics
Imports System.IO
Namespace MWareBackup
Public Module StartupModule
Public Sub Main()
Dim DisplayDate as String = Date.Now.ToString("MM-dd-yyyy")
Dim BackupFilename as String = "<folder name I can't provide>" &
DisplayDate & ".cab"
Console.WriteLine("Backup Utility Running For " & DisplayDate &
".")
Console.WriteLine("Backup Filename = " & BackupFileName & ".")
Process.Start("C:\PACL\PACOMP.EXE", "-a -r -p -c2 -e2 -w -lC:
\Backup.log " & BackupFilename & " <Other folder name I can't provide>
\*.*")
End Sub
End Module
End Namespace
Of all places, the exception is thrown in the line "Dim DisplayDate as
String = Date.Now.ToString("MM-dd-yyyy")"