Server Error in '/' Application.

Could not find file 'D:\sites\LightAvenue\Templates\cms_news_Details.html'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not find file 'D:\sites\LightAvenue\Templates\cms_news_Details.html'.

Source Error:


Line 1325:        //return LoadTemplates(false)[FileName.ToLower()];
Line 1326:        string TempalteFolder = ConfigurationManager.AppSettings["Localfilespath"] + "\\Templates\\" + FileName;
Line 1327:        return System.IO.File.ReadAllText(@TempalteFolder);
Line 1328:        //string TempalteFolder = System.Web.HttpContext.Current.Server.MapPath("~\\Templates\\");
Line 1329:        //System.IO.FileInfo MyFile = new System.IO.FileInfo(FileName);

Source File: d:\Sites\LightAvenue\App_Code\Util.cs    Line: 1327

Stack Trace:


[FileNotFoundException: Could not find file 'D:\sites\LightAvenue\Templates\cms_news_Details.html'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +1404
   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) +1242
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +146
   System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) +177
   System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost) +86
   Util.GetTemplate(String FileName) in d:\Sites\LightAvenue\App_Code\Util.cs:1327
   ScriptService.RenderTemplate(tbl_Main MyTbl) in d:\Sites\LightAvenue\App_Code\ScriptService.cs:4588
   ScriptService.RenderPageContent(tbl_Main MyPage, String ExtraInfo, String Language) in d:\Sites\LightAvenue\App_Code\ScriptService.cs:1223
   ScriptService.InitPage(String PageId, String ExtraInfo) in d:\Sites\LightAvenue\App_Code\ScriptService.cs:199
   _Pages.Page_Load(Object sender, EventArgs e) in d:\Sites\LightAvenue\Pages.aspx.cs:155
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4690.0