新手,问个很菜的问题
本人完全新手,想在网页里加一个投票功能,只好在网上收罗,找到一个投票代码[Asp.net简单投票系统源码],可是点击[投票]以后页面显示错误。查了字典也没看懂,希望大家帮我看看,这说的是什么意思,怎么解决。我先谢谢大家了~
页面显示如下:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Access to the path 'D:\123\App_Data\savepoll.dat' is denied.
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.UnauthorizedAccessException: Access to the path 'D:\123\App_Data\savepoll.dat' is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET access to a file, right-click the file in 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.
Source Error:
Line 60: Image3.Width = (int)(poll3ratio * 100);
Line 61:
Line 62: BinaryWriter bw2 = new BinaryWriter(new FileStream(Path, FileMode.Open, FileAccess.Write, FileShare.ReadWrite));
Line 63: bw2.Write(poll1);
Line 64: bw2.Write(poll2);
Source File: d:\123\pollresult.aspx.cs Line: 62
Stack Trace:
[UnauthorizedAccessException: Access to the path 'D:\123\App_Data\savepoll.dat' is denied.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +651
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) +1038
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) +114
pollresult.Page_Load(Object sender, EventArgs e) in d:\123\pollresult.aspx.cs:62
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +13
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +43
System.Web.UI.Control.OnLoad(EventArgs e) +98
System.Web.UI.Control.LoadRecursive() +71
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4300
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433