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 ......

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) ......

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() ......

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... } ......

My version of UnhandledExceptionModule

I've created my own version of UnhandledExceptionModule independantly of codePlex project in 2007, I've used code from http://support.microsoft.co... with considerations from http://www.eggheadcafe.com/... 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 ......

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 ......

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"- ......

Search engine optimization Links

Below there are a few links, that I used for my Search engine optimization research for PrintPagesOnline site. : http://websearch.about.com/... Keyword Selection Guidelines Where To Use Keywords Google Search Engine Optimization http://websearch.about.com/... http://en.wikipedia.org/wik... http://www.google.com/suppo... And more technical links: URL Rewriting Using ......

«June»
SunMonTueWedThuFriSat
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910