Fav 3 : Three Favorite Tips from Daily .NET Tips – Series 1

By | August 24, 2013

#1 : Get list of all active session variables in ASP.NET

This post talks about how you can get list of all active Session Variables in ASP.NET Application. The easiest way to get the details of session variable is using “Tracing” . If you enable the “Tracing” for your application, you can get list of all  Active Session variables. Another alternative way is, get all the list of session variable using “Session.Contents”.

#2 : Using Session with in HTTPHandler

This tip talks about how you can use Session with in your custom HTTPHandler.  By default if you try to read or write anything related with Session, you will get an NullReferenceException. If you want to plug Session with in your HttpHandler you have to implement the  marker Interface (Interfaces with no methods are called marker interfaces ) either IRequiresSessionState or IReadOnlySessionState .

#3 : Hide Methods from debugger Using DebuggerHidden attribute

DubuggerHidden attribute tells the Visual Studio debugger that the method is hidden from the debugging process and while debugging. This is quite helpful when you don’t want to go to stepping inside of a method while debugging. When you mark a method with DebuggerHidden() attributes, It’s explicitly tells the debugger not to step inside of that methods and no break point will be hit over that method. Now I am going to explain the same using a Example with Intellitrace debugging.

Fav 3, shares three favorites tips from the Daily .NET Tips.  This series of post will come only over  weekends ( Saturday / Sunday) .. just to refresh some of your old memories !

Favorite Tips

2 thoughts on “Fav 3 : Three Favorite Tips from Daily .NET Tips – Series 1

  1. Pingback: Fav 3 : Three Favorite .NET Tips and Tricks from Daily .NET Tips – Series 3 | Daily .NET Tips

Comments are closed.