当IIS远程服务器中的文件大小超过100kb时,在ASP.NET中堆叠文件 [英] File uploading in ASP.NET stacked when the file size greater than 100kb in IIS remote server

查看:89
本文介绍了当IIS远程服务器中的文件大小超过100kb时,在ASP.NET中堆叠文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个可以上传文件的页面。当我在localhost iis服务器上使用它时,它工作得很完美,但是当我将它发布到IIS远程服务器时,只能上传100KB以上这个大小的进度将被堆叠。



需要你的帮助



提前致谢;



我的尝试:



I have developed a page which can upload files. When I am using it in localhost iis server it works perfect but when I publish it to IIS remote server only can upload 100KB and over of this size the progress would be stacked.

Need your help

Thanks in advance;

What I have tried:

if (file != null && file.ContentLength > 0)
                try
                {
                    string tm = DateTime.Now.Ticks.ToString();
                    file.SaveAs(Server.MapPath("~/Documents/" + tm + file.FileName));
                    string paths = "Documents/" + tm + file.FileName;

推荐答案

目标IIS服务器可能配置为只允许那个大小的文件。您需要重新配置它



IIS Config [ ^ ]
The target IIS server is probably configured to only allow files of that size. You'll need to reconfigure it

IIS Config[^]


这篇关于当IIS远程服务器中的文件大小超过100kb时,在ASP.NET中堆叠文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆