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

未能找到路径“E:\WebHome\0Domain\Template\Person\2\5\index.htm”的一部分。

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

异常详细信息: System.IO.DirectoryNotFoundException: 未能找到路径“E:\WebHome\0Domain\Template\Person\2\5\index.htm”的一部分。

源错误:


行 108:        string SelfDoMain = c.Request.Url.Host.Split('.')[0];
行 109:
行 110:        string template = Helper.ReadTextFile(c.Server.MapPath("~/Template/Person/" + DomainID + "/" + Template + "/index.htm"));
行 111:        Generator gen = new Generator(template);
行 112:        gen.ParseTemplate();

源文件: e:\WebHome\0Domain\App_Code\Person.cs    行: 110

堆栈跟踪:


[DirectoryNotFoundException: 未能找到路径“E:\WebHome\0Domain\Template\Person\2\5\index.htm”的一部分。]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +271
   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, Boolean useLongPath, Boolean checkHost) +1217
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +144
   System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) +174
   System.IO.StreamReader..ctor(String path, Encoding encoding) +32
   EFPlatform.TemplateEngine.Helper.ReadTextFile(String fileName, Encoding encoding) +94
   EFPlatform.TemplateEngine.Helper.ReadTextFile(String fileName) +61
   Person.myInit(String savePath, Int32 UserID, String DomainID, String Template, String domain) in e:\WebHome\0Domain\App_Code\Person.cs:110
   Person..ctor(Hashtable ht) in e:\WebHome\0Domain\App_Code\Person.cs:69
   ASP.global_asax.Application_BeginRequest(Object sender, EventArgs e) in e:\WebHome\0Domain\Global.asax:96
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +139
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +88


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.7.3905.0