0

I have a web and use IIS to setup

when I upload a pdf file which is over 100kb there is two situations

1. On the IIS local PC the action will success like this and the file is placed in the temp folder enter image description here

2. On other PC the action will fail and show nothing choose like this and the file is not placed in the temp folder enter image description here

I have tried some solutions

  1. set maxAllowedContentLength in web.config
  2. set maxRequestEntityAllowed in web.config enter link description here
  3. set Maximum Request Entity Body Limit in IIS => ASP
  4. Set Load User Profile = False
    source : enter link description here

Plz someone help me to solve this problem sorry for my bad English :(

  • Can you show more debugging information? – Jason Pan May 24 '22 at 09:19
  • I would like to confirm which IIS version you are using? If you try to upload a PDF file < 100 KB then are you able to upload it from another machine? While trying to upload file > 100 KB, are you able to see any error or warning in the browser console? Have you set any file limit in your code as shown in the 3rd code example in [this link](https://learn.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.fileupload?view=netframework-4.8#examples)? – Deepak-MSFT May 24 '22 at 09:24

2 Answers2

0

The solution is changing IIS website port to 80 port

Dharman
  • 30,962
  • 25
  • 85
  • 135
  • Port 80 is a default port for the IIS. But it is strange that changing the port fixed this issue. It could be possible that something else fixed the issue. – Deepak-MSFT May 30 '22 at 07:40
  • yes i agree~ I think maybe some network setting in my company let it work or not work XD – Hao Ghe Kao May 31 '22 at 02:25
0

Use the following code.

<httpRuntime maxRequestLength="51200" executionTimeout="300"/>