Server Error in '/' Application.

Could not find a part of the path 'C:\Inetpub\vhosts\radiop1.com\httpdocs\StationCustomPages\41\336.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.DirectoryNotFoundException: Could not find a part of the path 'C:\Inetpub\vhosts\radiop1.com\httpdocs\StationCustomPages\41\336.htm'.

Source Error:


Line 50:                 Dim path As String = station.CustomPagesUploadsDir & "\" & SelectedTabId.ToString & ".htm"
Line 51: 
Line 52:                 Dim content As String = File.ReadAllText(Server.MapPath(path))
Line 53: 
Line 54:                 'remove any form tags and get action of form tag

Source File: C:\Inetpub\vhosts\radiop1.com\httpdocs\Views\custom.aspx.vb    Line: 52

Stack Trace:


[DirectoryNotFoundException: Could not find a part of the path 'C:\Inetpub\vhosts\radiop1.com\httpdocs\StationCustomPages\41\336.htm'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +239
   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) +2580
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +138
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +98
   System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) +139
   System.IO.StreamReader..ctor(String path, Encoding encoding) +20
   System.IO.File.ReadAllText(String path, Encoding encoding) +60
   views_custom.LoadPageContent() in C:\Inetpub\vhosts\radiop1.com\httpdocs\Views\custom.aspx.vb:52
   views_custom.Page_Load(Object sender, EventArgs e) in C:\Inetpub\vhosts\radiop1.com\httpdocs\Views\custom.aspx.vb:32
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.8974; ASP.NET Version:2.0.50727.8975