6.9 Увеличить максимальный размер загружаемого файла
24 сентября 2024 г.
18:36
-
**Title ** Web Designer Upload file error maximum file size
-
**Description ** Using the "Upload File" node and setting a maximum file size gives the following error message when compiling:
"Error code: CS1061; Error description:
VI_Employee_EditMasterData.cs(641,28): '
VI.WebRuntime.WebControls.FileUploader' does not contain a definition
for 'InputFile' and no extension method 'InputFile' accepting a first
argument of type 'VI.WebRuntime.WebControls.FileUploader' could be
found (are you missing a using directive or an assembly reference?)
(CS1061); Node: ; Property: ; Module: VI_Employee_EditMasterData;
Project name: VI_StandardWeb; Compiler: CSharp"
-
**Cause ** Product defect 34840.
-
**Resolution ** WORKAROUND
None
STATUS
A hotfix is available from Support, please reference defect ID 34840. Please note that "Maximum file size" should be a value in Bytes. Also, please note that Hotfix 33695 should be applied BEFORE Hotfix 34840 if it is being applied to a version earlier than 8.1.5, as there are file dependencies. Hotfix 34840 is for version 8.1.5 only.
If you are using IIS for hosting your application, then the default upload file size is 4MB. To increase it, please use this below section in your web.config -
\<configuration>\<system.web>\<httpRuntimemaxRequestLength="1048576"/>\</system.web>\</configuration>
For IIS7 and above, you also need to add the lines below:
\<system.webServer>\<security>\<requestFiltering>\<requestLimitsmaxAllowedContentLength="1073741824"/>\</requestFiltering>\</security>\</system.webServer>
Note:
-
maxRequestLength is measured in kilobytes
-
maxAllowedContentLength is measured in bytes
From \<https://stackoverflow.com/questions/3853767/maximum-request-length-exceeded>