When I upload pdf file using my asp.net web app, I get that is Error 101 (net::ERR_CONNECTION_RESET开发者_如何学Python): Unknown error.
This is not due to the file type, but the file size. By default, uploads are limited to 4 MB. Update web.config
to increase your maximum request length. For example, setting maxRequestLength
to 102400
will allow you to accept up to 100 MB; just be sure you want to allow that much data to be posted to your server.
<configuration>
<system.web>
<httpRuntime maxRequestLength="size in kb" />
</system.web>
</configuration>
I think before file upload you should clear your browsing data in your browser.
Just use simple Save as method of file upload control to upload pdf file.
FileUpload1.SaveAs(Path where to save pdf file)
精彩评论