chanteroc
asked on
Response.Redirect Slow as Molasses
Hello all,
I'm running into an issue which for the moment is more of an annoyance than anything else, but I was hoping you might shed some light on why it's happening.
I have a Web Form that does nothing other than display a log file in a pre tag's innner text. The page pulls in the contents of the log file just fine, but when the user clicks on the LinkButton, which should return the app to the Main Menu, the page appears to hang and then times out after 90 seconds or so.
Page code follows:
using RCP.Utilities;
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.IO;
using System.Web.UI.WebControls;
namespace RCP
{
/// <summary>
/// Summary description for RecordsCenters.
/// </summary>
public class ProcessViewLog : System.Web.UI.Page
{
#region Variables and Controls
protected Footer ucFooter1;
protected Footer ucFooter2;
protected AdminHeader ucAdminHeader;
protected System.Web.UI.HtmlControls .HtmlForm Form1;
protected System.Web.UI.WebControls. Label lblLogFile;
protected System.Web.UI.WebControls. Label lblHeader;
protected System.Web.UI.HtmlControls .HtmlGener icControl preLogFile;
#endregion
#region Page_Load()
private void Page_Load(object sender, System.EventArgs e)
{
if (! IsPostBack)
{
lblLogFile.Text = AdminProcess.GetLastProces sLog();
if (File.Exists(@lblLogFile.T ext))
{
string @tempFile = ConfigurationSettings.AppS ettings["R ootFolder" ] + "temp.log";
File.Copy(@lblLogFile.Text , @tempFile, true);
StreamReader fs = new StreamReader(@tempFile);
preLogFile.InnerText = fs.ReadToEnd();
fs.Close();
File.Delete(@tempFile);
}
else
{
preLogFile.InnerText = "The Log File " + @lblLogFile.Text + " was not found.";
}
}
}
#endregion
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.P age_Load);
}
#endregion
}
}
Many thanks!
John
I'm running into an issue which for the moment is more of an annoyance than anything else, but I was hoping you might shed some light on why it's happening.
I have a Web Form that does nothing other than display a log file in a pre tag's innner text. The page pulls in the contents of the log file just fine, but when the user clicks on the LinkButton, which should return the app to the Main Menu, the page appears to hang and then times out after 90 seconds or so.
Page code follows:
using RCP.Utilities;
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.IO;
using System.Web.UI.WebControls;
namespace RCP
{
/// <summary>
/// Summary description for RecordsCenters.
/// </summary>
public class ProcessViewLog : System.Web.UI.Page
{
#region Variables and Controls
protected Footer ucFooter1;
protected Footer ucFooter2;
protected AdminHeader ucAdminHeader;
protected System.Web.UI.HtmlControls
protected System.Web.UI.WebControls.
protected System.Web.UI.WebControls.
protected System.Web.UI.HtmlControls
#endregion
#region Page_Load()
private void Page_Load(object sender, System.EventArgs e)
{
if (! IsPostBack)
{
lblLogFile.Text = AdminProcess.GetLastProces
if (File.Exists(@lblLogFile.T
{
string @tempFile = ConfigurationSettings.AppS
File.Copy(@lblLogFile.Text
StreamReader fs = new StreamReader(@tempFile);
preLogFile.InnerText = fs.ReadToEnd();
fs.Close();
File.Delete(@tempFile);
}
else
{
preLogFile.InnerText = "The Log File " + @lblLogFile.Text + " was not found.";
}
}
}
#endregion
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.P
}
#endregion
}
}
Many thanks!
John
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you much; that was the ticket!
John