you can check the file lenght of the file that the user is trying to post to the server then display your message
try
{
if(fileToBeUploaded > constantMaximumFileSize)
{
//display your pretty message here
messageLabel.Text = "Hey! You can't upload a file more than " +
+ constantMaximumFileSize;
}
else
{
//do your upload code here
}
}
catch(HttpException httpEx)
{
//HttpExceptions is an exception that occurrs during the processing of HTTP requests
}
keith.rull
Member
266 Points
55 Posts
Re: Maximum request length exceeded
Apr 10, 2007 06:48 PM|LINK
you can check the file lenght of the file that the user is trying to post to the server then display your message
try { if(fileToBeUploaded > constantMaximumFileSize) { //display your pretty message here messageLabel.Text = "Hey! You can't upload a file more than " + + constantMaximumFileSize; } else { //do your upload code here } } catch(HttpException httpEx) { //HttpExceptions is an exception that occurrs during the processing of HTTP requests }-
My Personnal Site | DevPinoy.org: A Filipino Developers Community