R
rao
Hi
I am generating unique xml files and deleting them in page_unload event.
Application responds properly in normal conditions. When I keep clicking
on url that invoke the page several times the application blow up with
following error "Response is not available in this context". This happens
only when I keep clicking on link for stress test. Here is the code I process
on page_unload event. Any suggestions are welcome.
Thanks
Rao
private void Page_UnLoad(object sender, System.EventArgs e)
{
try
{
if (File.Exists(Server.MapPath(xmlDocPath+ProjectsDoc)))
{
File.Delete(Server.MapPath(xmlDocPath+ProjectsDoc));
}
if (File.Exists(Server.MapPath(xmlDocPath+ResourcesDoc)))
{
File.Delete(Server.MapPath(xmlDocPath+ResourcesDoc));
}
}
catch(Exception ex)
{Response.Write(ex.Message.ToString());}
}
I am generating unique xml files and deleting them in page_unload event.
Application responds properly in normal conditions. When I keep clicking
on url that invoke the page several times the application blow up with
following error "Response is not available in this context". This happens
only when I keep clicking on link for stress test. Here is the code I process
on page_unload event. Any suggestions are welcome.
Thanks
Rao
private void Page_UnLoad(object sender, System.EventArgs e)
{
try
{
if (File.Exists(Server.MapPath(xmlDocPath+ProjectsDoc)))
{
File.Delete(Server.MapPath(xmlDocPath+ProjectsDoc));
}
if (File.Exists(Server.MapPath(xmlDocPath+ResourcesDoc)))
{
File.Delete(Server.MapPath(xmlDocPath+ResourcesDoc));
}
}
catch(Exception ex)
{Response.Write(ex.Message.ToString());}
}