这样会导致W3P进程一直占用这个文件

System.IO.File.Create(HttpContext.Current.Server.MapPath(strName)) 

 

最好加上Dispose

System.IO.File.Create(HttpContext.Current.Server.MapPath(strName)).Dispose()

相关文章: