无法访问asp.net中的已关闭文件 [英] cannot access a closed file in asp.net
本文介绍了无法访问asp.net中的已关闭文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我上传文件时,它会在文件夹名称处出错。错误是无法访问已关闭的文件。
fuDocument.SaveAs(Server.MapPath ( 〜/ Attachments /)& DocName)
我们如何解决这个错误。
请帮助我。
谢谢
解决方案
请尝试以下方法:
http://shivasoft.in/blog/microsoft/net/cannot-access-a-closed-file-fileupload-in-asp-net/ [ ^ ]
http://forums.asp.net/post /3015230.aspx [ ^ ] 集团kquote>
试试这个:
fuDocument.SaveAs(Server.MapPath( 附件)+ \\ + fuDocument.FileName);
>
清洁解决方案
并再次构建。
它对我有用
When I am uploading a file then it give the error at folder name.The error is cannot access a closed file.
fuDocument.SaveAs(Server.MapPath("~/Attachments/") & DocName)
How we can solved this error.
Please help me.
Thanks解决方案Try following:
http://shivasoft.in/blog/microsoft/net/cannot-access-a-closed-file-fileupload-in-asp-net/[^]
http://forums.asp.net/post/3015230.aspx[^]
Hi,
try this one:
fuDocument.SaveAs(Server.MapPath("Attachments") + "\\" + fuDocument.FileName);
Clean Solution
and Build Again.
It worked for me
这篇关于无法访问asp.net中的已关闭文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文