One interesting feature that was introduced since .NET 4.0 was AppDomain.FirstChanceException FirstChanceException MSDN: Occurs when an exception is thrown in managed code, before the runtime searches the call stack for an exception handler in the application domain. This means that whenever an exception occurs in your managed code, all subscribers of above mentioned event will be notified with exception details. It is called first chance because this event is notified to the debugger or subscribers even before the actual program gets it. Event before Try/Catch block (if any) are executed. It serves as "first chance" to take a note of the exception thrown. All exceptions except Stackoverflow and access violation exceptions will be notified to this event. This is subscribed by your Visual Studo debugger, you can verify that by running an sample and throw an exception from your program. You will see following or similar output » Read more

 Jsinh        

I recently configured a trial Windows Server 2012 R2 VM to start fiddling with it and use it later for other not so important things. One beautiful winter night, I observed that even if I am not doing single nasty thing on this machine, still I see my CPU usage 100%. Whoa, who is eating my cookies? At first glance in task manger, I found two alien processes gobbling CPU and some RAM .Net Runtime Optimization Service (also known as mscorsvw.exe) Microsoft Common Language Run-time native compiler Until I was not aware of it, I thought it has to do something with .Net framework, I guess and the name suggest it is optimizing something. After few reads by people at Microsoft and others I finally understood the importance of mscorsvw.exe and why / when does it run. I probably will not repeat the whole story and violate Web DRY » Read more

 Jsinh        

AppDomain.CurrentDomain.SetupInformation property provides some general information about the currently executing assembly. This can provide more information about the assembly binding information for current instance of AppDomain used. Above property results instance of type AppDomainSetup class. Few properties you may find interesting about the currently executing assembly are as follows: ApplicationBase - ives the path to the directory that contains the application. ApplicationName - Gives name of the application (with extension). ConfigurationFile - Gives path to the configuration file of the application domain. TargetFrameworkName - Give a string that specifies the target version of .NET framework for   the application domain this string follows format defined for FrameworkName.FrameworkName property. Happy Coding !! » Read more

 Jsinh        

Where the hell is .NET framework 4.5 client profile ? Am I missing something ? Did I installed anything wrong ? Apocalypse ? No nothing is wrong, Microsoft have discontinued the client profile thingy from .NET Framework 4.5 onwards. Client profile was basically the version of .NET framework that was optimized for client application (according to MSDN). This basically means it can be used for most of the type of application developed against  .NET framework. One major difference between the full version and client profile of framework is that client profile is not the choice when you are development or deploying ASP.NET application or in generic sense server application. The client profile is the subset of the full framework targeting client machines in an domain or organization where you don’t want to provide capabilities to host or run server application. This client profile was available in .NET framework 3.5 » Read more

 Jsinh