Geeks With Blogs

Michael Freidgeim's Blog MS .Net Development June 2010 Entries
Upgrade to ASP.Net 4 on Web Farm
Recently we upgraded Web Farm web site to ASP.Net 4. We studied .NET Framework 4 Migration Issues and, fortunately, didn't found any serious issues, related to our site. Before all sites will be converted to .Net 4, for forms authentication cookies to work across .NET Framework versions, we've added <system.web> <machineKey validation="SHA1" /> </system.web> Tests were successfull on single computer, but when we started to test new version on Web Farm, we started to see intermittent ......

Posted On Saturday, June 26, 2010 9:59 PM

OutOfMemoryException in Microsoft WSE 3.0 Diagnostics.TraceInputFilter
We are still using Microsoft WSE 3.0 and on test server started to get Event Type: Error Event Source: Microsoft WSE 3.0 WSE054: An error occurred during the operation of the TraceInputFilter: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.String.GetStringForS... value, Int32 startIndex, Int32 length, Int32 capacity) at System.Text.StringBuilder.G... tid) at System.Text.StringBuilder.s... value) ......

Posted On Friday, June 11, 2010 10:19 PM

IsNullOrDefault generic helper function for nullable types
I've wrote IsNullOrDefault generic helper function public static bool IsNullOrDefault<T>(this Nullable<T> param) where T : struct { T deflt = default(T); if (!param.HasValue) return true; else if (param.Value.Equals(deflt)) return true; return false; } , but then realized that there is more short implementation on stackoverflow submitted by Josh public static bool IsNullOrDefault<T>(this Nullable<T> value) where T : struct { return default(T).Equals( value.GetValueOrDefault() ......

Posted On Friday, June 11, 2010 6:42 PM

Helper methods StartOfMonth and StartOfNextMonth
There are couple methods recently added to My DateTimeHelper class public static DateTime StartOfMonth(this DateTime dateValue) { return new DateTime(dateValue.Year,dat... } public static DateTime StartOfNextMonth(this DateTime dateValue) { return StartOfMonth(dateValue).Add... } ......

Posted On Friday, June 11, 2010 6:26 PM

My version of UnhandledExceptionModule
I've created my own version of UnhandledExceptionModule independantly of codePlex project in 2007, I've used code from with considerations from and done some refactoring. It also allows to use AppSettings["EventLogSource... The zip file also includes TestUnhandledExceptionWAP test project, that I used to investigate issue legacyUnhandledExceptionPolicy enabled="true" doesn't prevent ASP.NET application restarting ......

Posted On Friday, June 11, 2010 6:22 PM

VS 2010 snippet manager and quickCode
During the last few years I've used QuickCode and it was very helpful. Visual Studio 2010 has Code Snippets Manager that MS finally made quite convenient to use, so I will use it in a future. I will need to convert my QuickCode commands to VS snippets. I am sure I will miss Alt-Q hotkey for some time. Code snippets links: MSDN:Creating Code Snippets TIP:Create New Code Snippets from Existing Ones CodePlex Snippet Editor Codeplex Snippet Designer ......

Posted On Saturday, June 5, 2010 9:23 PM

How to "cast" from generic List<> to ArrayList
We are writing new code using generic List<> , e.g. List<MyClass>. However we have legacy functions, that are expect ArrayList as a parameter. It is a second time, when I and my colleague asked, how to "cast" generic List<MyClass> to ArrayList. The answer is simple- just use ArrayList constructor with ICollection parameter. Note that it is not real cast, it copies references to ArrayList. var list=new List<MyClass>(); //Fill list items ArrayList al=new ArrayList(list);//"cast"- ......

Posted On Saturday, June 5, 2010 9:10 PM

Search engine optimization Links
Below there are a few links, that I used for my Search engine optimization research for PrintPagesOnline site. : Keyword Selection Guidelines Where To Use Keywords Google Search Engine Optimization And more technical links: URL Rewriting Using ......

Posted On Tuesday, June 1, 2010 6:45 AM

Copyright © Michael Freidgeim | Powered by: | Join free