Solution: The process cannot access the file [filename] because it is being used by another process.

9 篇文章 0 订阅

http://www.brianstevenson.com/blog/solution-the-process-cannot-access-the-file-filename-because-it-is-being-used-by-another-process

在website上提交了请求,系统生成个文件并发往用户邮箱后发现该文件删除不了。明明是同一个进程,却提示被另一个进程占用。必须要recycle了application pool才能手动删除。

原来是因为发邮件的message需要在发送后diapost()后才可以。

MailMessage mail = new MailMessage();
。。。
mail.Dispose();

 

Process Monitor v3.1
http://technet.microsoft.com/en-us/sysinternals/bb896645

process monitor 使用教程
http://baoku.yunduan.cn/d/artitem/2274/1/9/0/432/


Portmon for Windows v3.03
http://technet.microsoft.com/en-us/sysinternals/bb896644


DiskMon for Windows v2.01
http://technet.microsoft.com/en-us/sysinternals/bb896646


DebugView v4.81

http://technet.microsoft.com/en-us/sysinternals/bb896647

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值