此外,我想知道当我在Web服务器上部署它时这将如何工作.我问,因为在后面的代码中,我仍然为文件上传的路径提供硬编码值.这是如何运作的?
解决方法
<system.web> <httpRuntime maxRequestLength="102400" executionTimeout="360"/> </system.web>
这就是你要找的东西.更改web.config文件中的executionTimeout属性.
根据this website,
maxRequestLength – Attribute limits
the file upload size for ASP.NET
application. This limit can be used to
prevent denial of service attacks
(DOS) caused by users posting large
files to the server. The size
specified is in kilobytes. As
mentioned earlier,the default is
“4096” (4 MB). Max value is “1048576”
(1 GB) for .NET Framework 1.0/1.1 and
“2097151” (2 GB) for .NET Framework
2.0.executionTimeout – Attribute indicates the maximum number of seconds that a request is allowed to execute before being automatically shut down by the application. The executionTimeout value should always be longer than the amount of time that the upload process can take.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。