User friendly message when the attachment size limit is reached?

Tuesday, March 1, 2011 9:48:58 AM

We have set a limit to 5MB

<httpRuntime maxRequestLength="5120" requestValidationMode="2.0" executionTimeout="120" />

When we try to attach bigger files a not very useful error message is displayed

"The website can't be displayed / button text = "diagnosis of connection problems"

We would like to replace this by a user friendly message,

like "The size of the attachment is too big. The limit 5MB...."

Is this possible by adding a parameter in the web.config or by another method ???

1 Replies
Tuesday, March 1, 2011 4:15:11 PM
Avatar
re: kagel on Tuesday, March 1, 2011 9:48:58 AM
Unfortunately, custom messages can't be put in at this time. The request-limit is handled outside of the application by IIS itself, and for us to override it, we woduld need to create IIS handlers to link in, and that would affect other files, pages, and sites handled by IIS as well, unfortunately.

We are looking into adding an uploader control, so that a progress of an upload can be shown, and when/if that is implemented, then the application can catch the size of uploads and display a message.

Statistics
  • Started: Tuesday, March 1, 2011 9:48:58 AM
  • Last Reply: Tuesday, March 1, 2011 4:15:12 PM
  • Replies: 1
  • Views: 922