Y
YaKs
Hi,
I am trying to handle th HttpException raised when you upload a file
too big. I changed the property maxRequestLength and I set it to 10000,
but I what to notice the user that the file is too big.
Finally I could handle this error at global.asax level, but when I try
to tranfer to the same page including an error flag in the session, it
takes about 10 seconds to transfer to the page and it look like my
browser shows a page from cache, it doesnt show the page processed
again because it should show the error message. If I reload the page,
then the error message appears so I am pretty sure that its a cache
problem.
I had already disabled the cache settings in my internet explorer...
:-?
maybe is it taken the page from some cache in .NET?
any idea?
any suggestion??
Thank you very much in advance
Jose
My code:
protected void Application_Error(Object sender, EventArgs e)
{
if (Server.GetLastError().InnerException.GetType().ToString() ==
"System.Web.HttpException")
{
log.Error("Aplication_Error :" +
Server.GetLastError().InnerException.Message );
Server.ClearError();
Session["Error"] = "El fichero no puede exceder los 20Mb de
tamaño.";
Server.Transfer(Request.RawUrl);
}
}
I am trying to handle th HttpException raised when you upload a file
too big. I changed the property maxRequestLength and I set it to 10000,
but I what to notice the user that the file is too big.
Finally I could handle this error at global.asax level, but when I try
to tranfer to the same page including an error flag in the session, it
takes about 10 seconds to transfer to the page and it look like my
browser shows a page from cache, it doesnt show the page processed
again because it should show the error message. If I reload the page,
then the error message appears so I am pretty sure that its a cache
problem.
I had already disabled the cache settings in my internet explorer...
:-?
maybe is it taken the page from some cache in .NET?
any idea?
any suggestion??
Thank you very much in advance
Jose
My code:
protected void Application_Error(Object sender, EventArgs e)
{
if (Server.GetLastError().InnerException.GetType().ToString() ==
"System.Web.HttpException")
{
log.Error("Aplication_Error :" +
Server.GetLastError().InnerException.Message );
Server.ClearError();
Session["Error"] = "El fichero no puede exceder los 20Mb de
tamaño.";
Server.Transfer(Request.RawUrl);
}
}