Reputation: 88092
I'm getting the following error when issuing a response.redirect to a certain page in my site and I have absolutely no idea on where to even start.
It completely craters the entire app:
Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e21213c
Exception code: 0xc00000fd
Fault offset: 0x0000000000001bf4
Faulting process id: 0x5cc
Faulting application start time: 0x01cc64155c263380
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Windows\system32\KERNELBASE.dll
Report Id: 9a9b04e2-d008-11e0-bebe-0019219d3cf7
Any ideas on how to go about debugging this? It happens on IIS 7.5 running under windows 2008 R2
Upvotes: 5
Views: 9105
Reputation: 88092
Rick and JaredPar both led me to the answer.
Essentially, I had a virtual method which was called when a property changed. In the implementation of the method on this particular page I changed the value of that property.. In effect setting up endless recursion.
The 0xc000000fd part of the error, as JaredPar pointed out, meant a stack overflow had occurred. Which should have been the first hint.
I do want to say that locating the actual problem area was difficult. Normal logging (using elmah) failed to fire at all and the problem was compounded because it was only occuring on a staging site. In the end I had to comment out large areas of code to get the page to just load. Then I slowly reintroduced them until I hit upon the method that caused the issue.
This let us see the actual data that led to the recursive behavior and the area in the method (property assignment) that kicked it off.
Upvotes: 3