Server Error in '/CalendarTest' Application.

Access to the path 'D:\wwwroot-apps\Calendar\App_Data\location.txt' is denied.   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at 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)
  at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
  at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
  at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
  at System.IO.StreamWriter..ctor(String path)
  at Gov.AlexandriaVa.Egov.Web.Calendar.Core.Location._WriteFile() in C:\LocalProjects\CalendarCore\Calendar\Location.cs:line 299
  at Gov.AlexandriaVa.Egov.Web.Calendar.Core.Location._LoadData() in C:\LocalProjects\CalendarCore\Calendar\Location.cs:line 364   at Gov.AlexandriaVa.Egov.Web.Calendar.Core.Location._LoadData() in C:\LocalProjects\CalendarCore\Calendar\Location.cs:line 368

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.Exception: Access to the path 'D:\wwwroot-apps\Calendar\App_Data\location.txt' is denied.   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  at 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)
  at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
  at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
  at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
  at System.IO.StreamWriter..ctor(String path)
  at Gov.AlexandriaVa.Egov.Web.Calendar.Core.Location._WriteFile() in C:\LocalProjects\CalendarCore\Calendar\Location.cs:line 299
  at Gov.AlexandriaVa.Egov.Web.Calendar.Core.Location._LoadData() in C:\LocalProjects\CalendarCore\Calendar\Location.cs:line 364   at Gov.AlexandriaVa.Egov.Web.Calendar.Core.Location._LoadData() in C:\LocalProjects\CalendarCore\Calendar\Location.cs:line 368

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[Exception: Access to the path 'D:\wwwroot-apps\Calendar\App_Data\location.txt' is denied.   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at 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)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
   at System.IO.StreamWriter..ctor(String path)
   at Gov.AlexandriaVa.Egov.Web.Calendar.Core.Location._WriteFile() in C:\LocalProjects\CalendarCore\Calendar\Location.cs:line 299
   at Gov.AlexandriaVa.Egov.Web.Calendar.Core.Location._LoadData() in C:\LocalProjects\CalendarCore\Calendar\Location.cs:line 364   at Gov.AlexandriaVa.Egov.Web.Calendar.Core.Location._LoadData() in C:\LocalProjects\CalendarCore\Calendar\Location.cs:line 368]
   Gov.AlexandriaVa.Egov.Web.Calendar.Core.Location._LoadData() in C:\LocalProjects\CalendarCore\Calendar\Location.cs:385
   Gov.AlexandriaVa.Egov.Web.Calendar.Core.Location.GetCache() in C:\LocalProjects\CalendarCore\Calendar\Location.cs:619
   Gov.AlexandriaVa.Egov.Web.Calendar.CalendarUtility.DropdownListLocation(Int32 locationID, HttpContext ctx) in C:\Local-git-clones\Apps-Web-CalendarDisplay\Calendar\CalendarUtility.cs:1104
   Gov.AlexandriaVa.Egov.Web.Calendar.CalendarUtility.GetSearchForm(Page pg, HttpContext ctx, QueryEngine qe, Event evt) in C:\Local-git-clones\Apps-Web-CalendarDisplay\Calendar\CalendarUtility.cs:562
   Gov.AlexandriaVa.Egov.Web.Calendar.List.Page_Load(Object sender, EventArgs e) in C:\Local-git-clones\Apps-Web-CalendarDisplay\Calendar\List.aspx.cs:399
   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.4700.0