Maximum Request Length Exceeded Not Redirect on Error Page

筅森魡賤 提交于 2019-12-02 07:02:33

I was able to find another way to solve maxRequestLength error. I found it in this link:

The solution was posted as comment by Rakesh Kumar Roy (Post Details: Friday, February 13, 2009 1:43 PM). This might be helpful for other programmers out there. :D

You can add

 <httpErrors errorMode="Custom" existingResponse="Replace">
  <remove statusCode="404" subStatusCode="13" />
  <error statusCode="404" subStatusCode="13" prefixLanguageFilePath="" path="http://localhost:1899/ErrorUpload.aspx" responseMode="Redirect" />
</httpErrors>

just after

<security>
  <requestFiltering>
    <requestLimits maxAllowedContentLength="5000000" />
  </requestFiltering>
</security>

where you redirect to a Error Page...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!