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

对路径的访问被拒绝。

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

异常详细信息: System.UnauthorizedAccessException: 对路径的访问被拒绝。

ASP.NET 未被授权访问所请求的资源。请考虑授予 ASP.NET 请求标识访问此资源的权限。ASP.NET 有一个在应用程序没有模拟时使用的基进程标识(通常,在 IIS 5 上为 {MACHINE}\ASPNET,在 IIS 6 上为网络服务)。如果应用程序正在通过 <identity impersonate="true"/> 模拟,则标识将为匿名用户(通常为 IUSR_MACHINENAME)或经过身份验证的请求用户。

To grant ASP.NET access to a file, right-click the file in File Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:


[UnauthorizedAccessException: 对路径的访问被拒绝。]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +7942581
   System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count) +7695519
   System.IO.FileStream.FlushWrite(Boolean calledFromFinalizer) +33
   System.IO.FileStream.Flush() +38
   System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) +117
   System.IO.StreamWriter.Flush() +11
   Sky.Framework.Log.ExceptionLog.Add(String error, ExceptionType type) +479
   Sky.Framework.Data.Clients.SqlServerProvider.ExecuteCommand(DbCommand command) +271
   Sky.Framework.Data.DbContext.Execute(DbCommand command) +158
   Sky.CMS.Controls.Model_ItemControl.UpViews(Int32 id) +173
   Sky.CMS.UI.Model_ItemHandler.View() +503
   Sky.Framework.HttpHandlers.BaseHandler.ExecuteAction(String actionCode) +347
   Sky.Framework.HttpHandlers.BaseHandler.ProcessRequest(HttpContext context) +75
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


版本信息: Microsoft .NET Framework 版本:2.0.50727.9061; ASP.NET 版本:2.0.50727.9062