fileupload控件复制 [英] fileupload controls Copy

查看:110
本文介绍了fileupload控件复制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的成员,

在我的网页中,我正在使用三个文件上传控件.单击添加按钮后,即可将这三个文件复制到我的服务器.如果我上传一个文件则无法正常工作...

这是我用来将文件复制到服务器的代码

Dear Memebers,

In my web page i am using three fileupload controls. On click of add button ineed to copy these three file to my server. it not working if i upload one file then its working properly...

this is the code i am using to copy file to server

if (fuLanguage.HasFile)
{
    fuLanguage.SaveAs(ServicePath + @"\" + LaguagePrompt);
}
if (fuCostPrompt.HasFile)
{
    fuCostPrompt.SaveAs(ServicePath + @"\" + CostPrompt);
}
if (fuGreetingPrompt.HasFile)
{
    fuGreetingPrompt.SaveAs(ServicePath + @"\" + GreetingPrompt);
}


请给我您的宝贵建议.

谢谢&问候
Developer


Please provide me your valuable suggestion.

Thanks & Regards
Developer

推荐答案

在web.config文件中添加标签

< httpRuntime

executionTimeout ="200"

maxRequestLength ="8192"

requestLengthDiskThreshold ="256"

useFullyQualifiedRedirectUrl =假"

minFreeThreads ="8"

minLocalRequestFreeThreads ="4"

appRequestQueueLimit ="5000"

enableKernelOutputCache ="true"

enableVersionHeader ="true"

requireRootedSaveAsPath ="true"

enable ="true"

shutdownTimeout ="90"

delayNotificationTimeout ="5"

waitChangeNotification ="0"

maxWaitChangeNotification ="0"

enableHeaderChecking ="true"

sendCacheControlHeader ="true"

apartmentThreading ="false"/>
Add a tag in web.config file

<httpRuntime

executionTimeout="200"

maxRequestLength="8192"

requestLengthDiskThreshold="256"

useFullyQualifiedRedirectUrl="false"

minFreeThreads="8"

minLocalRequestFreeThreads="4"

appRequestQueueLimit="5000"

enableKernelOutputCache="true"

enableVersionHeader="true"

requireRootedSaveAsPath="true"

enable="true"

shutdownTimeout="90"

delayNotificationTimeout="5"

waitChangeNotification="0"

maxWaitChangeNotification="0"

enableHeaderChecking="true"

sendCacheControlHeader="true"

apartmentThreading="false"/>


嗯,听起来文件的大小正在引起问题.尽管您提出了最后的错误或详细的结果,但我们可以更适当地建议您.

看起来,MaxRequestLength需要增加.

看看这个:
http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.maxrequestlength.aspx [ ^ ]
http://msdn.microsoft.com/en-us/library/e1f13641%28v = VS.100%29.aspx [ ^ ]
Well, it sounds like the size of the files are creating an issue. Though had you put up the final error or result in detail we could have suggested you more appropriately.

Looks like, MaxRequestLength needs to be increased.

Have a look at this:
http://msdn.microsoft.com/en-us/library/system.web.configuration.httpruntimesection.maxrequestlength.aspx[^]
http://msdn.microsoft.com/en-us/library/e1f13641%28v=VS.100%29.aspx[^]


这篇关于fileupload控件复制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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