Mengatasi System.Web.HttpException: Maximum request length exceeded Asp.Net

hal in iterjadi jika anda meng-Upload Sesuatu baik itu gambar ataupun document yang ukurannya besar,oleh karena itu munculan error System.Web.HttpException: Maximum request length exceeded,untuk mengatasinya,Silakan Tambahkan Kode berikut ini di web.config:
<system.web>
<httpRuntime maxRequestLength="1048576" />
</system.web>
dan jika anda menggunakan IIS7 silakan letakan kode berikut ini di web.config anda:
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1073741824" />
</requestFiltering>
</security>
</system.webServer>
Note: maxAllowedContentLength is measured in bytes while maxRequestLength is measured in kilobytes, which is why the values differ in this config example. (Both are equivalent to 1 GB.)
Semoga membantu dan bermanfaat.
0 Komentar