If broken it is, fix it you should

Using the powers of the debugger to solve the problems of the world - and a bag of chips    by Tess Ferrandez, ASP.NET Escalation Engineer (Microsoft)

Posts
  • If broken it is, fix it you should

    A case of lost session variables when using out of process session state

    • 0 Comments
    Recently I had a case where the customer had an issue with session variables.  The claim was that if they use in-proc session state their session variables would work just fine, but if they changed the session mode to stateserver in web.config their sessions were lost. <sessionState mode="StateServer" cookieless="UseCookies" stateConnectionString="tcpip=127.0.0.1:42424"/> When looking at bit closer at the repro, it wasn’t really all session variables that...
  • If broken it is, fix it you should

    Visual Studio 2010 .net debugging resource

    • 3 Comments
    If my post on dump debugging in VS 2010 piqued your interest, here is a list of a number of other new debugging features coming up in 2010 http://blogs.msdn.com/ms_joc/archive/2009/05/27/dev10-beta1-free-at-last.aspx I for one will be following the blog to get the scoop… On a related note, John Robbins also wrote a nice post about historical debugging in VS2010, I haven’t tried it yet but I can already see a number of ASP.NET scenarios where it can be applied. http://www.wintellect...
  • If broken it is, fix it you should

    First look at debugging .NET 4.0 dumps in Visual Studio 2010

    • 14 Comments
    I know that for a lot of you this is a bit far into the future, but I thought it would be nice to run through a few of my lab scenarios to show off some of the new features in Visual Studio 2010.  I am sure that I will miss a bunch of cool features here as this post is just based on my first experience with this, but I will likely post more about these features as we get closer to RTM.  As we are only in Beta, anything and everything may change before RTM and the below is just based on...
  • If broken it is, fix it you should

    Background Garbage Collection in CLR 4.0

    • 10 Comments
    Yesterday I found this really nice Channel 9 interview with Maoni Stephens (Dev Owner of the CLR GC) and Andrew Pardoe (Program manager for the CLR GC) where they talked about the new Background GC in CLR 4.0. She also talks about it here and there is not much value in me repeating what she already says there but basically the main points of the video and the post are: Concurrent GC is being replaced by Background GC in CLR 4.0 Concurrent GC is the mode of the GC that you use in desktop...
  • If broken it is, fix it you should

    Debug Diag script for troubleshooting .NET 2.0 Memory leaks

    • 27 Comments
    I have put together a quick and dirty debug diag script for troubleshooting .net memory leaks. (attached to this post) The reason I put it together was mainly to show how you can create your own debug diag scripts but feel free to use it to troubleshoot memory leaks, knowing that it does string parsing on the output so it is a bit prone to errors if sos changes output formats. NOTE: This script will only work on .NET 2.0 x86 memory dumps Mourad recently published a whitepaper on debug diag...
  • If broken it is, fix it you should

    Neat .NET 2.0 StackViewer to troubleshoot hangs/performance issues

    • 13 Comments
    Bret wrote a post about Managed Stack Explorer , a really nice tool that was developed in 2006 but since then seems to have been forgotten. It’s excellent if you want to troubleshoot hangs/performance issues in a process but don’t want to go through the hassle of getting and analyzing a dump.   What it will do is basically attach, snap the .net call stack and detach so you can see what all the .net threads are doing without using a debugger. What is even cooler is that you can copy/run...
  • If broken it is, fix it you should

    Unable to load DLL ‘dllname.dll’: A dynamic link library (DLL) initialization routine failed. 0x8007045A

    • 13 Comments
    I recently got an email with the following question: “Can you give me some very helpful hints with this one ? I am struggling with the following error in an asp.net application. Exception Message: Internal Error : Unable to load DLL 'RdbNet.dll': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A) The RdbNet.dll is an .NET dll from Oracle so I can't debug into it. If I use a windows forms application I never have the error. I have already used procmon...
  • If broken it is, fix it you should

    Show me the memory: Tool for visualizing virtual memory usage and GC heap usage.

    • 25 Comments
    A colleague of mine, John Allen, created an awesome tool way back that displays memory usage in a process very nicely. I use screenshots from it from time to time in presentations or posts but unfortunately that tool is not publicly available. Since lots of people have asked me about it I figured I would just do a quick and dirty mock-up (based on the same ideas) and post the VS solution here. This sample tool will give you a visual overview of the virtual memory space (from a memory dump)...
  • If broken it is, fix it you should

    .NET Exceptions: Quick WinDbg/SOS tip on how to dump all the .NET exceptions on the heap

    • 12 Comments
    Since a .net exception is a .NET object like any other, it gets stored on the GC heap when you (or some code you call) calls new XXException().  This means that if you have a memory dump of a process you can dump out all the recent exceptions that have occurred, or rather all exceptions that have not yet been garbage collected, which will give you a good feel for what exceptions occurred recently.  Doing this is pretty easy if you have sos loaded (.loadby sos mscorwks) in windbg 0:015>...
  • If broken it is, fix it you should

    Validation of viewstate MAC failed after installing .NET 3.5 SP1

    • 44 Comments
    After installing .NET 3.5 SP1 you may get Validation of viewstate MAC failed exceptions when doing post backs on ASP.NET pages Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information...
  • If broken it is, fix it you should

    Developers are from Mars, Ops people are from Venus… or It looked good on paper

    • 19 Comments
    A few weeks back me and Micke (one of our Architect Evangelists) had a session at TechDays where we talked about “things that looked good on paper” i.e. things that sound pretty ok in the design/development phase but sometimes turn out to be a disaster in production. We are both pretty passionate about making the lives of the ops. people easier by thinking about the maintenance of the sites/apps at design time, rather than having it be an afterthought.  I stole the title of this post from one...
  • If broken it is, fix it you should

    Debugging a .NET crash with rules in Debug Diag

    • 26 Comments
    During mine and Micke’s presentation at TechDays this week I showed a demo of setting up rules with Debug Diag to identify the cause of a crash in an ASP.NET application. Even though debugging might be tricky, setting up rules in Debug Diag is beautifully simple and I personally believe that it would be a good idea for anyone running a web site to have debug diag installed along with a few instructions for the ops personnel on how to set up the rules. Better yet, you can set up the rules in advance...
  • If broken it is, fix it you should

    Silverlight/WPF FlipImage Animation

    • 19 Comments
    I was working on some Silverlight samples and needed an image that could flip over as in the example below. All the samples I could find on the net were pretty complex and contained a lot of code to do the animation and I wanted something really simple. To create the illusion of an image that flips over (or any kind of UI element that flips over) you just need 4 things 1. A front image / UI element 2. A back image / UI element 3. A flip animation 4. A reverse animation The flip...
  • If broken it is, fix it you should

    .NET Rocks: Debugging chat

    • 11 Comments
    Yesterday I had a nice chat with Richard and Carl at .NET Rocks . We talked about .net, debugging, memory issues and a bunch of other stuff, and in the end I got a pop quiz that I failed:) See if you can figure out what caused the outage on their servers… The show will be uploaded here some time today. Laters, Tess
  • If broken it is, fix it you should

    Silverlight Game – Part 3 - Using Linq to XML to read and generate the levels

    • 4 Comments
    This is part three in a series of 5 posts showing how I built a simple game in Silverlight, you can follow along (reading the posts in order) to build your own Traffic Jam game. I would recommend that you also go through ScottGu’s silverlight tutorials as well as the other tutorials on www.silverlight.net In Part 2 we created some Cars to place on the board, in this post we will read the level information and place the Cars accordingly. I have attached a number of xml files to this post...
  • If broken it is, fix it you should

    Silverlight Game – Part 4 - Adding drag and drop functionality to move the cars around

    • 4 Comments
    This is part four in a series of 5 posts showing how I built a simple game in Silverlight, you can follow along (reading the posts in order) to build your own Traffic Jam game. I would recommend that you also go through ScottGu’s silverlight tutorials as well as the other tutorials on www.silverlight.net In part 3 we finished the level generation, now we are getting ready to move the cars around a little. 1. Add EventHandlers for MouseLeftButtonDown, MouseMove and MouseLeftButtonUp on the...
  • If broken it is, fix it you should

    Silverlight Game – Part 5 – Storing Highscores in Isolated Storage

    • 10 Comments
    This is part five in a series of 5 posts showing how I built a simple game in Silverlight, you can follow along (reading the posts in order) to build your own Traffic Jam game. I would recommend that you also go through ScottGu’s silverlight tutorials as well as the other tutorials on www.silverlight.net In parts one through four we created a traffic jam game called Seattle Streets. The object of the game was to move cars around and get the red car to reach the exit in as few moves as possible...
  • If broken it is, fix it you should

    Silverlight Game – Part 1 – Creating the main layout

    • 5 Comments
    This is part one in a series of 5 posts showing how I built a simple game in Silverlight, you can follow along (reading the posts in order) to build your own Traffic Jam game. I would recommend that you also go through ScottGu’s silverlight tutorials as well as the other tutorials on www.silverlight.net 1. Create a new Silverlight Application using VS 2008 and call it SeattleStreets When you click ok you will be asked to create an asp.net application or automatically generate a test page...
  • If broken it is, fix it you should

    Silverlight Game – Part 2 – Creating a Car UserControl

    • 3 Comments
    This is part two in a series of 5 posts showing how I built a simple game in Silverlight, you can follow along (reading the posts in order) to build your own Traffic Jam game. I would recommend that you also go through ScottGu’s silverlight tutorials as well as the other tutorials on www.silverlight.net In Part 1 we created the layout for the page/playing board, in this post we will create a Car UserControl to place on the board. The car we are creating will look something like this....
  • If broken it is, fix it you should

    Silverlight 2.0 Walkthrough – Creating a “Traffic Jam” game

    • 12 Comments
    This series of posts are not really in-line with my normal debugging posts, but I just created a simple Traffic Jam game in Silverlight and thought I’d make it into a “lab series” that you can go through if you are getting started with Silverlight. The game is called Seattle Streets and it based on the popular board game Rush Hour® where you help a little red car move to the Exit square by moving the other cars out of its way in as few moves as possible. The project for the finished game is attached...
  • If broken it is, fix it you should

    .NET Memory Leak reader email: Are you really “leaking” .net memory

    • 6 Comments
    I get several emails every week through the blog asking for help on various issues.  Unfortunately due to time constraints I can’t really look at them all on an individual bases but I thought this particular request might be interesting to share. The problem description was “One of our w3wp.exe’s just keep on growing (slowly), and never releasing memory back to the pot.  The main offender appears to be System.String and System.Object[]”  and the email then had some !dumpheap –stat...
  • If broken it is, fix it you should

    .NET Memory Leak: To dispose or not to dispose, that’s the 1 GB question

    • 33 Comments
    I was looking at a memory dump recently for an issue where the process would grow to over 1 GB and return OutOfMemory Exceptions. Debugging the issue: A full user dump of the w3wp.exe process was taken with debug diag 1.1 when memory was really high. If you are reading this and have no clue what debug diag is, how to get dumps with it, or use leak tracking, here is the download and the usage instructions . The dump itself was 1.34 GB which is basically the memory we have committed (used) so it was...
  • If broken it is, fix it you should

    10 years 10 lbs of M&Ms

    • 40 Comments
    This week I turned 10 in Microsoft years which according to MS tradition means that you need to bring in 10 lbs of M&Ms to the office to treat your co-workers with as they stop by and reminisce about the past 10 years :)  We don’t really have M&Ms in the stores in Sweden so I had to substitute for my favorite Swedish candy instead. 10 years is quite some time, but it feels even longer in our business when you think about how much happens with technology in 10 years. When I first started...
  • If broken it is, fix it you should

    Troubleshooting .Net SQL Connectivity issues: What data should you gather?

    • 3 Comments
    Spike in our data access support team has a really good blog talking about data access related issues in .net. Recently he wrote a really good post about what you should gather to troubleshoot a connectivity issue effectively such as Connection strings SQL Server logs The exact error message (with stack trace and other details) Netmon traces Memory dumps File version info along with what you should look for in each… I would recommend both that post and the blog as a whole to anyone dealing with data...
  • If broken it is, fix it you should

    .NET Hang: Analyzing Debug Diag output

    • 5 Comments
    Earlier this week I got an email from a reader who had a hang in an application and sent in some Debug Diag logs. In order for me to dig in deeper I would need to open a support case as I would have to ask follow up questions and look at the dumps etc. However, I wanted to show some interesting details from his report to show you how to move forward if you get an issue like that. Analyzing the debug diag output At the top of the report generated by debug diag for the dump, you will see an analysis...
Page 3 of 11 (252 items) 12345»