“/WebApplication4”应用程序中的服务器错误。
--------------------------------------------------------------------------------该进程无法访问文件“c:\test\a.a.doc”,因为该文件正由另一进程使用。 
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.IO.IOException: 该进程无法访问文件“c:\test\a.a.doc”,因为该文件正由另一进程使用。源错误: 
行 56:  string name=this.TextBox1 .Text ;
行 57:  if(File.Exists (spath+name))
行 58:  File.Delete (spath+name);
行 59:  }
行 60: 
 源文件: c:\inetpub\wwwroot\webapplication4\webform1.aspx.cs    行: 58 堆栈跟踪: 
[IOException: 该进程无法访问文件“c:\test\a.a.doc”,因为该文件正由另一进程使用。]
   System.IO.__Error.WinIOError(Int32 errorCode, String str) +614
   System.IO.File.Delete(String path) +165
   WebApplication4.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\webapplication4\webform1.aspx.cs:58
   System.Web.UI.WebControls.Button.OnClick(EventArgs e)
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
   System.Web.UI.Page.ProcessRequestMain()