如何在ASP.NET 2.0中使用C#刷新文件夹的数据 [英] How to Refresh a folder's data using c# in asp.net 2.0

查看:67
本文介绍了如何在ASP.NET 2.0中使用C#刷新文件夹的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Asp.net 2.0中开发一个网站,目的是在LogfileDate中跟踪用户的一些详细信息,例如其ID,点击的页数和点击的时间等(LogfileDate包含整天的时间)所有用户的摘要)保存在一个文件夹中(文件夹在我的项目中).在创建新的日志文件日期的另一天,我想邮寄前一天的日志文件,并在发送后删除该文件.一切都发生了,但是当它要删除它的显示文件时,已被另一个进程访问.因此,我需要在发送邮件后刷新该文件夹,以便它可以腾出缓冲区.我不使用IIS,并且不希望使用它.

I am developing a website in Asp.net 2.0 in that i''m tracking the user''s some details like their id,no of page hitted and time of hitting etc, in a LogfileDate(the LogfileDate contains whole day summary of all users) saved inside a folder(Folder is inside my project). And at another day when a new logfileDate created i want to mail the previous day Logfile and delete that file after sending. Everything happened but when It is going to delete its shows file is accessed by another process. So I need to refresh that folder after sending mail so that it got free with buffer. I''m not using IIS and i dont want it to use.

推荐答案

ved Barharwa写道:
ved Barharwa wrote:

我不使用IIS,但我不想使用它.

I''m not using IIS and i dont want it to use.



那该如何服务呢?

您无法删除该文件,因为正在写入该文件的进程仍在使用该文件.您需要停止该过程并关闭文件,以便文件可用.



Then how is this site being served up?

You can''t delete the file because it is still being used by the process that is writing to it. You''ll need to stop that process and close the file so it will be available.


这篇关于如何在ASP.NET 2.0中使用C#刷新文件夹的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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