I want to upload large files with FileUpload control. The page with this control located in Admin folder.
In admin folder's web.config file i set:
<httpRuntime maxRequestLength="900000"/>
But this does not effect!
Only if I set this line in root's web.config it works.
Why?
========================================================
Consider using a location section (in the web.config that is located in the root):
http://msdn.microsoft.com/en-us/library/b6x6shw7%28VS.71%29.aspx
Location - Path: The resource that the specified configuration settings apply to. Using location with a missing path attribute applies the configuration settings to the current directory and all child directories. If is used with no path attribute and allowOverride is specified to be false, configuration settings cannot be altered by Web.config files in child directories.
The following example sets the uploaded file size limit to 128KB for only the page specified.
<configuration>
<location path="UploadPage.aspx">
<httpRuntime maxRequestLength="128"/>
</location>
</configuration>
====================================================================
Комментариев нет:
Отправить комментарий