Put the code in Global.asax under c:\Inetpub\wwwroot\wss\VirtualDirectories\80
void Application_Error(object sender, EventArgs e) { //To catch the error caused by masssive file size upload more than 4MB. HttpException httpEx = Server.GetLastError() as HttpException; if(httpEx.ErrorCode == -2147467259) { HttpContext.Current.Server.ClearError (); HttpContext.Current.Server.Transfer("ErrorMessage.aspx"); } } |
No comments:
Post a Comment