locked
Long processing page times out after one hour (ASP .NET 4.0) RRS feed

  • Question

  • User590730288 posted

    During an upload that happens, "Page cant be displayed" error occurs after one hour both in local and after hosting it in IIS. The session time out "in proc" is kept as 4 hours. The process is going on actually i guess but only the UI shows error. Even auto refreshing the page didnt work.

    Will be helpful if any insights can be provided on this.

    Wednesday, October 28, 2015 3:48 AM

All replies

  • User-1923420989 posted

    Thanuja, Leave the UI Thread responsive by assign upload task to a new thread.

    Wednesday, October 28, 2015 6:22 AM
  • User475983607 posted

    You'll need to supply a bit more information on what you're doing because Session has nothing to do with file upload unless the application subscribes to Session events. 

    Taking a shot in the dark, I imagine the error is likely due to a device in the connection chain closing the connection as ab hour is a long time for an HTTP connection.   Consider using a tool like WireShark to monitor the connection.  It might provide more information on what going on.  Also, consider contacting your network admin and let him/her know what you're doing and they should be able to provide assistance.

    Wednesday, October 28, 2015 8:59 AM
  • User765422875 posted

    If the upload is a fire and forget task, then you can run that process in the background.

    https://msdn.microsoft.com/en-us/library/dn636893(v=vs.110).aspx

    HostingEnvironment.QueueBackgroundWorkItem(ct =>
            {
                try
                {
                    // your code
                }
                catch (Exception ex)
                {
                    // handle & log exception
                }
            });

    Thursday, December 3, 2015 3:57 PM