“/tianqi_m”应用程序中的服务器错误。

System.UnauthorizedAccessException: 对路径“E:\web\天气全国版_移动\cache\lishitianqi_2801.txt”的访问被拒绝。
  在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  在 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)
  在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
  在 System.IO.StreamWriter.CreateFile(String path, Boolean append)
  在 System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
  在 System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
  在 Cbf.Common.CacheHelper.FileCache.Insert(String p_FileName, String p_Content)

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Exception: System.UnauthorizedAccessException: 对路径“E:\web\天气全国版_移动\cache\lishitianqi_2801.txt”的访问被拒绝。
  在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
  在 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)
  在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
  在 System.IO.StreamWriter.CreateFile(String path, Boolean append)
  在 System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
  在 System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
  在 Cbf.Common.CacheHelper.FileCache.Insert(String p_FileName, String p_Content)

源错误:


行 85: 		<div class="col-xs-12"><h4><a href="/tianqi/lishi/"><%=CityName%>历史天气</a></h4></div>
行 86: 		<ul class="lishi">
行 87: 		<%=fun.GetLishiTianqi(CityID,CityName)%>
行 88: 		</ul>
行 89: 

源文件: e:\web\天气全国版_移动\index.aspx    行: 87

堆栈跟踪:


[Exception: System.UnauthorizedAccessException: 对路径“E:\web\天气全国版_移动\cache\lishitianqi_2801.txt”的访问被拒绝。
   在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   在 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)
   在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
   在 System.IO.StreamWriter.CreateFile(String path, Boolean append)
   在 System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
   在 System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
   在 Cbf.Common.CacheHelper.FileCache.Insert(String p_FileName, String p_Content)]
   Cbf.Common.CacheHelper.FileCache.Insert(String p_FileName, String p_Content) +233
   function.GetLishiTianqi(String CityID, String CityName) +848
   ASP.index_aspx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in e:\web\天气全国版_移动\index.aspx:87
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +256
   System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +19
   System.Web.UI.Page.Render(HtmlTextWriter writer) +29
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +27
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +99
   System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1266


版本信息: Microsoft .NET Framework 版本:2.0.50727.3649; ASP.NET 版本:2.0.50727.3653