Troubleshooting IIS "Hang" / Postback Not Working

Discussion in 'ASP .Net' started by happyinst, Apr 20, 2005.

  1. happyinst

    happyinst Guest

    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
    isn't working.

    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
    remote host

    A first chance exception of type 'System.IO.IOException' occurred in

    Additional information: Unable to read data from the transport connection.

    happyinst, Apr 20, 2005
    1. Advertisements

  2. Hi Lori ,

    Welcome to ASP.NET newsgroup.
    From your description, one of your 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

    Steven Cheng
    Microsoft Online Support

    Get Secure!
    (This posting is provided "AS IS", with no warranties, and confers no
    Steven Cheng[MSFT], Apr 20, 2005
    1. Advertisements

  3. tones411


    Oct 9, 2012
    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.
    tones411, Oct 9, 2012
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Craig Pearson

    IIS/ASP.NET Hang

    Craig Pearson, Nov 23, 2003, in forum: ASP .Net
    Natty Gur
    Nov 24, 2003
  2. =?Utf-8?B?TG9yaSBNY0RvbmFsZA==?=

    Troubleshooting Object Reference Not Set to Instance of an Object

    =?Utf-8?B?TG9yaSBNY0RvbmFsZA==?=, Apr 9, 2004, in forum: ASP .Net
    MS News \(MS ILM\)
    Apr 10, 2004
  3. =?Utf-8?B?VmljdG9yIFNvbmc=?=

    Server.Transfer working for IIS 5.1 but not for IIS 6.0

    =?Utf-8?B?VmljdG9yIFNvbmc=?=, May 31, 2004, in forum: ASP .Net
    Jun 1, 2004
  4. Ido Zur

    ASP hang on XP IIS 5.1

    Ido Zur, Mar 2, 2004, in forum: ASP General
    Ray at
    Mar 3, 2004
  5. Newbro

    Export very large excel hang IIS

    Newbro, Jul 4, 2008, in forum: ASP General
    Chris Hohmann
    Jul 5, 2008

Share This Page