tags:

views:

68

answers:

5

I'm wondering about people's process when they try to learn about the guts of .NET. Let me give a particular example to clarify.

Recently, we found an error with the StateServer we are using on our .NET website. Sometimes its its starts tossing errors and our site goes crazy. The StackTrace reveals this occurs when:

System.Web.SessionState.SessionStateModule.BeginAcquireState() 

gets called. Is there a good way to learn more about SessionStateModule, BeginAcquireState and what's going on in there? MSDN doesn't seem to have anything about this method.

I'd like not only to fix the problem, but more generally to learn about the process and what's going on. What steps have others found helpful (I'll test the process to see how helpful it is on the particular error I mentioned :-) )

+1  A: 

If you just want to see what it does, and don't need to actually step through it in the debugger, then you want Reflector.

This will look at the IL of a compiled assembly and put it back together as source code in C# (or VB.NET or various other .NET languages, if you really want...).

Aaronaught
+2  A: 

Reflector might be useful.

Also, if you're curious about stack trace and performance involved on each method call, you can use ANTS Profiler.

born to hula
+3  A: 

I often will grab .NET Reflector, and just look at the class in question.

If that isn't enough, you can also get the .NET Source code under the (MS Reference License). This lets you debug the framework directly.

Reed Copsey
+1  A: 

Sure is. Open up the DLL in Reflector and take a look :-)

http://www.red-gate.com/products/reflector/

you can see exactly what's under the hood in the framework.

Ian Jacobs
+1  A: 

The source code for this class, with comments, is available from the Reference Source. I never had any luck getting the source server to work reliably, I strongly recommend the NetMassDownloader to get it. Half an hour of babysitting and you're set. Be sure to read John Robbins' usage notes in his blog.

Hans Passant