Server Error in '/' Application.

Could not find file 'C:\HostingSpaces\kcinstitutes\kcinstitutes.com\wwwroot\App_Data\externalFiles\QuickLinks\Student_Portal.htm'.

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 'C:\HostingSpaces\kcinstitutes\kcinstitutes.com\wwwroot\App_Data\externalFiles\QuickLinks\Student_Portal.htm'.

Source Error:


Line 66:                 else
Line 67:                 {
Line 68:                     var fp = File.OpenText(Server.MapPath("~/App_Data/externalFiles/") + xpage + ".htm");
Line 69:                     userContent = fp.ReadToEnd();
Line 70:                     fp.Close();

Source File: c:\HostingSpaces\kcinstitutes\kcinstitutes.com\wwwroot\page.cshtml    Line: 68

Stack Trace:


[FileNotFoundException: Could not find file 'C:\HostingSpaces\kcinstitutes\kcinstitutes.com\wwwroot\App_Data\externalFiles\QuickLinks\Student_Portal.htm'.]
   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.StreamReader..ctor(String path) +55
   System.IO.File.OpenText(String path) +46
   ASP._Page_page_cshtml.Execute() in c:\HostingSpaces\kcinstitutes\kcinstitutes.com\wwwroot\page.cshtml:68
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +252
   System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +99
   System.Web.WebPages.WebPage.ExecutePageHierarchy() +185
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +107
   System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +142


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