application-onerror

ASP.NET - how to show a error page when uploading big file (Maximum request length exceeded)?

不想你离开。 提交于 2019-11-30 17:47:20
Application able to record error in OnError, but we are not able to do any redirect or so to show something meaningfull to user. Any ideas? I know that we can set maxRequestLength in web.config, but anyway user can exceed this limit and some normal error need to be displayed. As you say you can setup maxRequestLength in your web.config (overriding the default 4MB of your machine.config) and if this limits is exceeded you usually get a HTTP 401.1 error. In order to handle a generic HTTP error at application level you can setup a CustomError section in your web.config within the system.web

ASP.NET - how to show a error page when uploading big file (Maximum request length exceeded)?

给你一囗甜甜゛ 提交于 2019-11-30 16:48:21
问题 Application able to record error in OnError, but we are not able to do any redirect or so to show something meaningfull to user. Any ideas? I know that we can set maxRequestLength in web.config, but anyway user can exceed this limit and some normal error need to be displayed. 回答1: As you say you can setup maxRequestLength in your web.config (overriding the default 4MB of your machine.config) and if this limits is exceeded you usually get a HTTP 401.1 error. In order to handle a generic HTTP