Exception information: Exception type: HttpException Exception message: Maximum request length exceeded. at System.Web.HttpRequest.GetEntireRawContent() at System.Web.HttpRequest.GetMultipartContent() at System.Web.HttpRequest.FillInFormCollection() at System.Web.HttpRequest.get_Form() at System.Web.HttpRequest.get_HasForm() at System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) at System.Web.UI.Page.DeterminePostBackMode() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)我知道這個(gè)exception是由于上傳的文件大于config里面設(shè)置的maxRequestLength的時(shí)候拋出的。但能不能在哪個(gè)地方控制,當(dāng)遇到這個(gè)異常時(shí)跳轉(zhuǎn)到另一個(gè)較為友好一點(diǎn)的URL,而不是 "Internet Explorer cannot display the webpage"?
如何處理HttpException?
函數(shù)式編程
2018-10-10 05:06:41