Geeks With Blogs

Tim Huffam Dotting the I and crossing the T of I.T. November 2006 Entries
Unhandled exceptions in secondary threads on .NET 2.0 will shut down the whole app.
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 ......

Posted On Wednesday, November 22, 2006 12:01 PM

Enabling XP visual styles in your .NET winforms app.
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 ......

Posted On Monday, November 20, 2006 1:41 PM

Error installing .Net 3.0: Microsoft .NET Framework 3.0 has encountered a problem during setup.
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... ......

Posted On Friday, November 17, 2006 9:28 AM

SQL Server datetime set blank or null = SQL Server error: System.Data.SqlTypes.SqlTypeException: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
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 ......

Posted On Wednesday, November 8, 2006 8:32 PM

Copyright © Tim Huffam | Powered by: GeeksWithBlogs.net