PDF upload
-
I try to use HTML element to upload files from web clients to server. It works very well except when I select a PDF file and submit the form containing the then I get to "The page cannot be displayed" error page. I have tried several file formats: GIF, JPG, DOC, TIFF ..., with these there are no problem only when I try to upload a PDF. (K)
-
I try to use HTML element to upload files from web clients to server. It works very well except when I select a PDF file and submit the form containing the then I get to "The page cannot be displayed" error page. I have tried several file formats: GIF, JPG, DOC, TIFF ..., with these there are no problem only when I try to upload a PDF. (K)
Well, you should check your code again. PDF files uploads like all other files, so there must be some problem with the code. Maybe your PDF file is much bigger than other files you've tried to upload? Put your all uploading code into TRY...CATCH block and check what kind of error is generated (is there is one). -- Mariusz 'mAv' Wójcik master e-software engineer (BPC)
-
Well, you should check your code again. PDF files uploads like all other files, so there must be some problem with the code. Maybe your PDF file is much bigger than other files you've tried to upload? Put your all uploading code into TRY...CATCH block and check what kind of error is generated (is there is one). -- Mariusz 'mAv' Wójcik master e-software engineer (BPC)
Well I have tested it on a quite small PDF and it works. It seems you are right. How can I make my server accept big files? (If there is a way...) It seems to me that there is no exception but the whole request is not handled, it doesn't reach the server code becouse I think the request is blocked when there is a big file to upload. (K)
-
Well I have tested it on a quite small PDF and it works. It seems you are right. How can I make my server accept big files? (If there is a way...) It seems to me that there is no exception but the whole request is not handled, it doesn't reach the server code becouse I think the request is blocked when there is a big file to upload. (K)
-
Indeed, there is a property to determine max file upload size in ASP.NET. To everyone who need to upload big files:
<configuration>
<system.web>
<httpRuntime maxRequestLength="40000"
useFullyQualifiedRedirectUrl="true"
executionTimeout="45">
</system.web>
</configuration>More info you can find at http://msdn.microsoft.com/library/en-us/cpgenref/html/gngrfHttpRuntimeSection.asp. -- Mariusz 'mAv' Wójcik master e-software engineer (BPC)