Server Error in '/' Application.

Access to the path 'C:\Inetpub\vhosts\lightningsportsracing.com\httpdocs' 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 'C:\Inetpub\vhosts\lightningsportsracing.com\httpdocs' 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 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.

Source Error:


Line 59:         // Get a StreamReader class that can be used to read the file
Line 60:         StreamReader objStreamReader;
Line 61:         objStreamReader = File.OpenText(fileName);
Line 62: 
Line 63:         // Now, read the entire file into a string

Source File: c:\inetpub\vhosts\lightningsportsracing.com\httpdocs\results_detail.aspx.cs    Line: 61

Stack Trace:


[UnauthorizedAccessException: Access to the path 'C:\Inetpub\vhosts\lightningsportsracing.com\httpdocs' is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +10909891
   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) +2580
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +138
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) +98
   System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) +139
   System.IO.StreamReader..ctor(String path, Boolean detectEncodingFromByteOrderMarks) +127
   System.IO.File.OpenText(String path) +44
   results_detail.LoadContent() in c:\inetpub\vhosts\lightningsportsracing.com\httpdocs\results_detail.aspx.cs:61
   results_detail.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\lightningsportsracing.com\httpdocs\results_detail.aspx.cs:34
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


Version Information: Microsoft .NET Framework Version:2.0.50727.9061; ASP.NET Version:2.0.50727.9062