该进程无法访问文件imageurl,因为它正在被另一个文件使用 [英] the process cannot access the file imageurl because it is being used by another

查看:89
本文介绍了该进程无法访问文件imageurl,因为它正在被另一个文件使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在asp.net.my中上传文件.我的文件是image.如果文件已经存在,那么我必须删除现有图像并上传新图像.但是,如果我尝试更新现有文件,则会显示错误消息该进程无法访问该文件,因为该文件正在被另一个进程使用".









谢谢...........

I am trying to upload a file in asp.net.my File is image . If the file already exist then I have to remove existing image and upload the new image. But if I try to Update existing file, it shows an error that "The process cannot access the file because it is being used by another process".









thanks...........

推荐答案

我认为您已打开图像文件并尝试更新相同的文件.在这种情况下,它将显示这种类型的错误.一旦关闭打开的图像文件,然后重试.
I think you have opened the image file and trying to update the same one. In that case it will show this type of error. Once close the image files which are opened and try again.


您好,

请在此处显示您的代码.
由于不是disposing 对象,可能是问题所在.
删除后文件对象将要处置吗?
如果不是,则在删除文件后处置对象.
也许可以解决错误.
Hi,

Please show your code here.
May be the problem due to not disposing the objects.
After delete the file object is going to dispose?
If not then dispose the object after delete the file.
May be it will solve the error.


这篇关于该进程无法访问文件imageurl,因为它正在被另一个文件使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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