Troubleshooting IIS "Hang" / Postback Not Working
I have recently added some code to a web application and now I find it
hanging after I do about 2 or 3 postbacks within the application. It hangs
doing different things (I cannot find anything in common) and when I run in
Debug mode, it doesn't even appear to be within my code when it hangs (I put
breakpoints all over the place and it doesn't stop at any of them during the
It hangs after I click a button on the page... but it never reaches the
Page_Load event of the page it is posting back to.. it is like the PostBack
How do I figure out what is going on? What really confuses me is the fact
that the code works the first time but not the second time I run it.. even
with the exact same input data...
It does seem to be related to uploading images... so I went through my code
and made sure I was disposing of all of the image objects in Finally
Any thoughts on how I can find the problem?
I have ANTS profiler by Red Gate software and I tried doing a memory profile
but it didn't seem to get me anywhere (either that or I wasn't doing it
It is not causing IIS to crash... just to "spin" for a long time. This is
on my development Win XP Pro machine.
After quite some time, I get the following errors when I debug... but I
think they are more a symptom of the non-response to the application as
opposed to the cause of my problem.
A first chance exception of type 'System.Net.Sockets.SocketException'
occurred in system.dll
Additional information: An existing connection was forcibly closed by the
A first chance exception of type 'System.IO.IOException' occurred in
Additional information: Unable to read data from the transport connection.
RE: Troubleshooting IIS "Hang" / Postback Not Working
Hi Lori ,
Welcome to ASP.NET newsgroup.
From your description, one of your asp.net always run into hanging after
you do some modification recently. I'm not quite sure what's your orginally
code logic and what's your modification on them. However, have you been
able to isolate the problem to a certain or some certain individule pages?
Also, based on your error message, I think you're doing some network
transfering task , using Socket or httpwebrequest? Generally, if your
server's CPU utilization is not high and application hangs, it's likely
that there are some thread deadlock in your app or there are some longrun
task in your page's exectution steps which block the server's workthreads.
Would provide some further description on your code logic?
In addition, I suggest you turn on the ASP.NET's trace and use Trace.Write
or Warn to output some trace info in the different stage of those page's
execution lifecycle. For example, before page_load and after Page_Load or
before a method call and after a method call. Then, we can use the
application's trace.axd to view which stage consumes most of the times.
If there are any further findings, please feel free to post here also. Good
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
Database transaction not ended?
We had a similar issue. It turns out that on one postback a database transaction was started, then an error occurred but the db transaction was never rolled back. Then on the next postback, the transaction was still open, so when trying to touch the same table again in the db, it caused the web application to hang.
|All times are GMT. The time now is 01:08 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.