Server Error in '/' Application.

Access to the path "C:\Inetpub\wwwroot\CustomerSites\Halifax\privatemotors\SessionLog\2008 05 09.xml" 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\wwwroot\CustomerSites\Halifax\privatemotors\SessionLog\2008 05 09.xml" 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 write 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:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[UnauthorizedAccessException: Access to the path "C:\Inetpub\wwwroot\CustomerSites\Halifax\privatemotors\SessionLog\2008 05 09.xml" is denied.]
   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, Int32 bufferSize) +44
   System.IO.StreamWriter.CreateFile(String path, Boolean append) +55
   System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize) +49
   System.IO.StreamWriter..ctor(String path, Boolean append) +66
   EPPrivateMotors.SessionLogger..ctor(HttpRequest r) in c:\inetpub\wwwroot\PrivateMotors\SessionLogger.cs:45
   EPPrivateMotors.Global.Session_Start(Object sender, EventArgs e) in c:\inetpub\wwwroot\PrivateMotors\Global.asax.cs:86
   System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e) +132
   System.Web.SessionState.SessionStateModule.CompleteAcquireState() +512
   System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +697
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +66
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +173


Version Information: Microsoft .NET Framework Version:1.1.4322.2407; ASP.NET Version:1.1.4322.2407