现在的位置: 首页 > 综合 > 正文

网站静态化读写文件冲突怎么解决?

2012年02月14日 ⁄ 综合 ⁄ 共 1541字 ⁄ 字号 评论关闭
网站进行静态化,思路如下:
根据静态文件的时间判断是否是最新的静态文件,如果是,直接反馈静态文件,否则生成新的静态文件并返回。
现在的问题是时不时会出现如下的错误:

事件代码: 3005
事件消息: 发生了未处理的异常。
事件时间: 2008-4-1 18:12:15
事件时间(UTC): 2008-4-1 10:12:15
事件 ID: bc1880e95c6f42b6970ce31eba3afd65
事件序列: 49205
事件匹配项: 70
事件详细信息代码: 0
 
应用程序信息:
    应用程序域: /LM/W3SVC/282653056/Root-1-128515111904077500
    信任级别: Full
    应用程序虚拟路径: /
    应用程序路径: D:\s\
    计算机名: computer
 
进程信息:
    进程 ID: 5220
    进程名: w3wp.exe
    帐户名: NT AUTHORITY\NETWORK SERVICE
 
异常信息:
    异常类型: IOException
    异常消息: 文件“e:\c\2468712.html”正由另一进程使用,因此该进程无法访问该文件。  错在这里
 

    用户: 
    是否已经过身份验证: False
    身份验证类型: 
    线程帐户名: NT AUTHORITY\NETWORK SERVICE
 
线程信息:
    线程 ID: 300
    线程帐户名: NT AUTHORITY\NETWORK SERVICE
    是否正在模拟: False
    堆栈跟踪:    在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   在 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
   在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   在 System.IO.StreamWriter.CreateFile(String path, Boolean append)
   在 System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
   在 System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
   在 System.Web.UI.Control.OnPreRender(EventArgs e)
   在 System.Web.UI.Control.PreRenderRecursiveInternal()
   在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 
 
自定义事件详细信息:

有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。

抱歉!评论已关闭.