Server Error in '/' Application.

Could not find file 'D:\Inetpub\webs\5939303_web\www\Soubory\ObsahyStranek\PodminkyVerejnost.txt'.

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:\Inetpub\webs\5939303_web\www\Soubory\ObsahyStranek\PodminkyVerejnost.txt'.

Source Error:


Line 58:         string obsahPath = ConfigurationManager.AppSettings["ObsahyStranekPath"];
Line 59:         obsahPath += "PodminkyVerejnost.txt";
Line 60:         StreamReader sr = new StreamReader(Server.MapPath(obsahPath));
Line 61:         string obsahStrankyString = sr.ReadToEnd();
Line 62:         sr.Close();

Source File: d:\inetpub\webs\5939303_web\www\PodminkyVerejnost.aspx.cs    Line: 60

Stack Trace:


[FileNotFoundException: Could not find file 'D:\Inetpub\webs\5939303_web\www\Soubory\ObsahyStranek\PodminkyVerejnost.txt'.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +311
   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) +1017
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) +66
   System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost) +93
   System.IO.StreamReader..ctor(String path) +32
   PodminkyVerejnost.Page_Load(Object sender, EventArgs e) in d:\inetpub\webs\5939303_web\www\PodminkyVerejnost.aspx.cs:60
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +85
   System.Web.UI.Control.OnLoad(EventArgs e) +79
   System.Web.UI.Control.LoadRecursive() +130
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2853


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