使用0 KB进行文件上传 [英] File uploding with 0 KB

查看:88
本文介绍了使用0 KB进行文件上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

i使用以下代码将上传文件导入我的上传文件。当我在本地计算机上使用时工作正常。

我部署了我的应用程序在IIS中,文件已上传但为0 KB且无法打开。关于这个的任何帮助





Hello,
i am using below code for upload file into my Uploads file.it is working fine when i use in my local machine.
once i deployed my application in IIS, the file uploaded but with 0 KB and unable to open. any help regarding this


string filename = System.IO.Path.GetFileName(FileUpload.FileName);
FileUpload.SaveAs(Server.MapPath("~/Uploads/") + filename);

推荐答案

您的代码没问题,但可能是您的iis配置有问题。检查您是否具有写入权限的上传文件夹?检查您的IIS设置可以上传多大文件。希望你的问题能够解决。
Your code is OK but may be your iis configuration have some problem. Check your upload folder that have write permission or not? Check your IIS settings that how much large file can upload. Hope your problem will be solved.


这篇关于使用0 KB进行文件上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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