This is a series of debugging demos aimed to help you get some hands on experience in debugging the most common types of Hang/performance, memory and crash scenarios in .net applications.
The demos are written in ASP.NET which means that you do need IIS and .net framework 2.0 installed on the development machine where you install the demos.
Each new demo will have a set of instructions on how to get started but the lab instructions are deliberately kept very brief in order to give you the most chance to explore on your own. Hints will be available for each demo in case you get stuck.
New demos will be published on http://blogs.msdn.com/Tess as time permits (I am planning to release one new lab per week).
All demos will use the same web site so there is only one application to install for all demos.
Note: These demos will cause high CPU usage, high memory consumption and crashes, so make sure that you are only installing these demos on development machines where no one else will be bothered by the system hanging or the web server crashing.
3. Browse to the default site http://localhost/BuggyBits/default.htm to make sure that you set up the vdir correctly.
4. Browse to the Company info site http://localhost/BuggyBits/CompanyInformation.aspx to make sure that you can view aspx pages correctly.
7. Install tinyget (comes with the IIS6.0 resource kit http://support.microsoft.com/kb/840671 ) we will be using this for stressing some of the pages in order to produce hangs and memory leaks.
Debugger installed with the debugging tools for windows.
Comes with the framework and exists in the Framework directory (usually C:\Windows\Microsoft.NET\Framework\v2.0.50727) for simplicity you can copy sos.dll to the debuggers directory.
where c:\mycache is where it will store the local copies of the cached symbols. If you choose to save workspace information when asked in windbg, this symbol path will be saved for the next debugging session.
See http://support.microsoft.com/kb/840671 for more info.
FYI – This mentions that the code requires .Net 2.0, but I had to install 3.5 to get the Featured Products page to load.
Where I can find the InternetConnections.reg ?
It should be in the zip file.
great, i will make it chinese.
Is the zipfile still available??
It seems to can't be downloaded!!
Such a great lab that I can't just let it go!!
The zipfile can't seem to be downloaded !!!
The zip file should still be available and I just tried downloading it a moment ago and then it worked fine so i suspect there might have been a temporary glitch yesterday.
These look really helpful and I have one or two web apps that could use some scrutiny. Thanks for posting them!
tinyget (comes with the IIS6.0 resource kit) is installed on the develop machine(BuggyBits site on the IIS) or the client side(Browse) ?
Tinyget is your browser in this case (the app that sends the http request). You can install it wherever you want to, just make sure that the servername, url is valid from your location (i.e. change localhost to the server name if you are doing it removely)… also consider that if you run tinyget remotely then you may have other factors like bandwidht issues between client and server etc. to factor in to what you see as far as response times etc.
If I'm running windows xp (iis 5.1). Would this labs work also if I use inetinfo process instead ?
I absolutely LOVE what you have done here! These labs are great; I never thought reading about diagnosing memory problems could actually be entertaining, but you have made me a believer.
That said, I included a plug about your podcast in my weekly podcast (http://www.cubertainment.com), and I also plan to cover these labs in a presentation I'm giving at our local .NET user group (lrdnug.org).
Thank you very much on these excellent labs and TechEd presentation! In a few days I'll demo couple of labs on Web-Fu! which is the major ASP.NET event in Serbia. It would be impossible without your posts!
If we set the IIS as per step 6, (InternetConnections.reg file ), then should we undo this setting for normal operations ?
No need to undo them. This setting just allows you to make 10 concurrent outgoing connections to the same server instead of the standard 2.
I would really enjoy seeing similar labs without the need for IIS (using WinForms or just plain command-line executables).
I wrote a couple of trivial examples in native code for my colleagues as a beginner exercise in WinDbg, but I could certainly benefit myself from some .Net examples.
The message pretty much means what it says, the aspnet account doesnt have access to read from the location on your disk where you stored the content.
have anyone done these labs in IIS 7 ? The labs specify the usage of some tools for IIS 6 … not sure if those tools can be installed and used in IIS 7, any ideas ?
I have ran these labs on IIS7, both with the 2.0 framework (and 3.5) as well as with the 4.0 framework.
Both debugging tools for windows and tinyget can be installed and work on Vista, 2008 and Win7, with IIS7.
Are you having any specific issues? or are you just asking in preparation for doing this?
I'm just asking before I get into the labs, thanks for the info!
This blog has just helped us diagnose what was a diabolical memory allocation issue in IE7. Not only have you saved us from having to possibly re-architect a large chunk of our first release of software, but have given us some valuable knowledge on how to combat such issues when released.
I am trying to open the aspx but its failing , i have installed .net 3.0 framework.
Are there anyother settings which i need to perform ?
Great labs ! Fantastic work..
Just a quick question, whats the impact of the Registry edit and restricting/expanding the number of allowable connections per server? After we finish the lab, do we have to put it back somehow or does it not matter?
Brief me what are all the setting required to ran these labs on IIS7 , .Net framework 4.0 and also Windows7 .
we are frequently getting "Server Unavailable" error from the application .
Application developed using VS 2008 , IIS 6.0 , SQL Server 2005 and Windows server 2003.
Finally choose WINDBG Tool analyze "Server Unavailable" error and taken application crash dump files from the sever.
When i ran the command !DumpHeap -stat , getting thousands of objects.
Here i am getting stuck to identify which object is giving error.
Please tell me How to identify the object which is giving error ? How to fix the error in the above scenario ?
Server Unavailable usually means that the process crashed which could be due to a million and one reasons. The link you mentioned walks through a basic investigation of why an object is not collected which probably doesn't have a whole lot to do with your problem. The best advice I can give on how to start out is to try going through some of the crash labs in this series and apply the steps to your dump if you got a crash dump.
Is it required entire VS 2005 or VS 2008?
Not sure I understand… you should definitely not install any of these labs in a production environment, they are designed to crash and cause memory leaks for learning purposes only.
If you are referring to whether you can gather dumps in production then yes, you can using debug diag, procdmp, adplus etc. but i would recommend debugging the dumps on a developer machine.
Windbg is a tool that requires a good deal of background knowledge of debugging which is why i have set up these labs for people to learn, but if your issue is very urgent i would suggest that you contact support as debugging with windbg is not something you neccessarily want to learn under preassure.
I'm getting frequent APPCRASH error in eventviewer and the application pool gets stopped.
My machine is Windows 7 and .NET Framework version is 2.0, I am facing the same issue in version 4.0 also. what could be the reason for this issue?
The force is strong with you! Great blog!
Tess you're awesome.. I love you.. I mean you're article….
I have .net 4 framework and i am usng psscor 4.
Tinyget is not available in windows 7 platform because IIS 6.0 Resource Kit is not available for the platform. Is there any other application can be used for same purpose?
Thanks Tess for all your blog posts. I was able to solve many performance issue with our application.