“/”应用程序中的服务器错误。

未能找到路径“f:\usr\LocalUser\hmw098147\sofftj8utb0by\counter.txt”的一部分。

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.IO.DirectoryNotFoundException: 未能找到路径“f:\usr\LocalUser\hmw098147\sofftj8utb0by\counter.txt”的一部分。

源错误:


行 6:  		System.IO.StreamReader srd;
行 7:  		string file_path=Server.MapPath ("counter.txt");
行 8:  		srd=System.IO.File.OpenText (file_path);
行 9:  		while(srd.Peek ()!=-1) //返回下一个可用的字符,但不使用它
行 10: 		{

源文件: f:\usr\localuser\hmw098147\Global.asax    行: 8

堆栈跟踪:


[DirectoryNotFoundException: 未能找到路径“f:\usr\LocalUser\hmw098147\sofftj8utb0by\counter.txt”的一部分。]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +193
   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) +1162
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +65
   System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) +87
   System.IO.StreamReader..ctor(String path) +30
   System.IO.File.OpenText(String path) +35
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in f:\usr\localuser\hmw098147\Global.asax:8
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


版本信息: Microsoft .NET Framework 版本:2.0.50727.8669; ASP.NET 版本:2.0.50727.5491