一个...弱...问题 各路大虾帮忙!!!!(gxyfish)
“/hhh”应用程序中的服务器错误。
--------------------------------------------------------------------------------
对路径“E:\ASP.NET\BOOK\guestbook\data\count.xml”的访问被拒绝。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.UnauthorizedAccessException: 对路径“E:\ASP.NET\BOOK\guestbook\data\count.xml”的访问被拒绝。
ASP.NET 未被授权访问所请求的资源。请考虑授予 ASP.NET 请求标识访问此资源的权限。ASP.NET 有一个在应用程序没有模拟时使用的基进程标识(通常,在 IIS 5 上为 {MACHINE}\ASPNET,在 IIS 6 上为网络服务)。如果应用程序正在通过 <identity impersonate="true"/> 模拟,则标识将为匿名用户(通常为 IUSR_MACHINENAME)或经过身份验证的请求用户。
若要授予 ASP.NET 对文件的写访问权,请在资源管理器中右击该文件,选择“属性”,然后选择“安全”选项卡。单击“添加”添加适当的用户或组。突出显示 ASP.NET 帐户,选中所需访问权限对应的框。
源错误:
生成此未处理异常的源代码只能在调试模式中进行编译时显示。若要启用该功能,请执行以下步骤之一,然后请求 URL:
1. 在生成错误的文件的顶部添加一个“Debug=true”指令。示例:
<%@ Page Language="C#" Debug="true" %>
或者:
2. 将以下节添加到应用程序的配置文件中:
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
请注意,第二种方法将使给定应用程序中的所有文件在调试模式下进行编译。第一种方法只使特定文件在调试模式下进行编译。
重要事项:以调试模式运行应用程序肯定会引起内存/性能系统开销。在部署到产品方案中之前,应该确保应用程序已禁用调试。
堆栈跟踪:
[UnauthorizedAccessException: 对路径“E:\ASP.NET\BOOK\guestbook\data\count.xml”的访问被拒绝。]
System.IO.__Error.WinIOError(Int32 errorCode, String str) +393
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy) +888
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +45
System.Xml.XmlTextWriter..ctor(String filename, Encoding encoding) +34
System.Data.DataSet.WriteXml(String fileName, XmlWriteMode mode) +48
System.Data.DataSet.WriteXml(String fileName) +7
_ASP.default_aspx.count() +948
_ASP.default_aspx.__RenderForm1(HtmlTextWriter __output, Control parameterContainer) +68
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +27
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +44
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +263
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
_ASP.default_aspx.__Render__control1(HtmlTextWriter __output, Control parameterContainer) +124
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +27
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1929
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:1.1.4322.573; ASP.NET 版本:1.1.4322.573