response.redirect- updatepanel- long process

sindhuxyz
sindhuxyz used Ask the Experts™
on
Hi,

I am using updatepanel in page, on button click; a long process starts. After completion of process it should move to other page(I am using response.redirect).

Problem is, I cannot move to other page, I tried response.redirect and javascript functions as well. When process take 30-45 seconds it can move to other page but when process take 2-3 minutes then it do not move to next page.

Any advise?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
Possibly you need to extend the allowable processing time.  What operating system are you on?

Author

Commented:
My development machine has XP and server has Windows server 2003 64 bit.

This works

        System.Threading.Thread.Sleep(3000)
        Response.Redirect("Result.aspx")


This do not work
System.Threading.Thread.Sleep(300000)

  Response.Redirect("Result.aspx")
300000 milli sec  = 300 sec == 5 min

so wait for 5 min

OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

or use

180000 mili sec  = 3 min
System.Threading.Thread.Sleep(180000)

Or for 2 min

120000 mili sec  = 2 min
System.Threading.Thread.Sleep(120000)

Author

Commented:
@ ID:36327083

Dont you think, I know Sleep function!!! Please focus on issue and try to help me on it. Thanks

Commented:
Hi there -

It is likely that your script is timing out.  In which case you need to increase the .server.ScriptTimeout value.

How to do this and an example can be found here, along with a useful discussion:
http://forums.asp.net/p/1294382/2521451.aspx

Hope this helps.

Author

Commented:
None of above worked!!
Most Valuable Expert 2012
Top Expert 2014
Commented:
Try setting the

AsyncPostBackTimeout

property of the scriptmanager control.

Author

Commented:
None of these solution worked, I changed code.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial