Under .NET 2.0 an unhandled exceptions on a secondary thread now are no longer swallowed by the framework - instead they will shut the app down. However using the AppDomain.UnhandledException event will handle this - or you can revert to .NET 1.1 behavior by adding this line to your config: <legacyUnhandledExceptio... enabled="1" /> You should now use a try/catch block on every thread entry method. See this great doc on threading (page 12 inparticular). Thanks to Matt and Jan for this ......
Ever wondered why your winforms app looks good (ie shows Windows XP type styling) in the Visual Studio designer (VS2005) yet when you run it, it looks very Windows 2000 (not very colorful and no rounded corners)? That's because by the XP styling is turned off by default. To enable it, include the following line in your form's constructor: System.Windows.Forms.Applic... Simple when you know huh. HTH Tim ......
This error: Microsoft .NET Framework 3.0 has encountered a problem during setup. Setup did not complete correctly. occured while installing the .NET 3.0 redistrubutable (downloaded from here) on my PC running XP Pro SP (also with .NET 1.1 & 2.0). After some investigation it turns out this error was caused when installing the WCF (Windows Communication Foundation) components - when trying to open the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\C... ......
This error (System.Data.SqlTypes.SqlTy... SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.) will occur if you try to pass an uninitialised DateTime value into an SQL Server stored procedure from .NET code (in my case C# in an ASP.NET app). To work around this you must pass in a value - null will not work. In my case I have a generated class that passes a System.DateTime variable into the System.Data.SqlClient.SqlCo... method. So my ......