rescobar Posted May 21, 2003 Posted May 21, 2003 I'm trying to run an ASP.NET app using VS.NET 2002 in a Windows 2003 Server. This application run ok under Windows 2000 with VS.NET 2000. One of my processes runs a package in a SQL Server. This process takes more than 5 minutes. At aprox. 5 minutes I obtain the follwing message in the browser: The page cannot be displayed ..... blah ..... blah ...... Cannot find server or DNS Error Internet Explorer I tried to move every "timeout" variable in machine.config without results. Does anyone knows what to do? Thanks in advance Ramiro Quote
Moderators Robby Posted May 21, 2003 Moderators Posted May 21, 2003 You should run the Package as stateless/asynchronous. Look up Threading, it's quite simple. Quote Visit...Bassic Software
rescobar Posted May 21, 2003 Author Posted May 21, 2003 Where do I have to configure the package as stateless/asynchronous? In the SQL Server? in the asp application?. I spent two days until now. Thanks for your kind help Quote
Moderators Robby Posted May 22, 2003 Moderators Posted May 22, 2003 The threading is done using ASP.... [mshelp]ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfSystemThreadingThreadClassStartTopic.htm[/mshelp] Quote Visit...Bassic Software
rescobar Posted May 22, 2003 Author Posted May 22, 2003 My code follows. It works, but in the redirect statament the "The resource cannot be found. HTTP 404" error is produced. Dim ePaq As New clsPersistencia Dim bThreadStart As New ThreadStart(AddressOf ePaq.EjecutaPaquetesClmst1_01) Dim bThread As New Thread(bThreadStart) bThread.Start() Dim ii As Integer Do While bThread.ThreadState = System.Threading.ThreadState.Running ii += 1 Loop Response.Redirect("Principal.aspx") Do you have any idea? Tks and rgds Quote
Moderators Robby Posted May 22, 2003 Moderators Posted May 22, 2003 In case you perfer to let the thread run on its own, you can get rid of the following... Dim ii As Integer Do While bThread.ThreadState = System.Threading.ThreadState.Running ii += 1 Loop Quote Visit...Bassic Software
rescobar Posted May 22, 2003 Author Posted May 22, 2003 The last thing that I woul want to do before the new thread ends is request.redirect an asp page to warn the user that the long thread is finished. any idea? Tks again Quote
Moderators Robby Posted May 23, 2003 Moderators Posted May 23, 2003 Does your current Loop cause a timeout? Quote Visit...Bassic Software
rescobar Posted May 23, 2003 Author Posted May 23, 2003 No (the long query is executed in the new thread) but what I would want is to diplay an asp page when this query ends. Quote
rescobar Posted May 23, 2003 Author Posted May 23, 2003 Sorry, I got out the loop from the code. My new code is as follows: Dim ePaq As New clsPersistencia Me.lblDateTime.Text = Date.Now.TimeOfDay.ToString ePaq.strArg = ePaq.ProcesoThread.Calificacion.sPttit1_01 Dim bThreadStart As New ThreadStart(AddressOf ePaq.EjecutaPaquete) Dim bThread As New Thread(bThreadStart) bThread.Start() Response.Redirect("Espere.aspx" When the code includes a loop, there is a timeout Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.