Server Error in '/' Application.

Access to the path 'G:\PleskVhosts\shenvalleyyardsales.com\httpdocs\feeds\yardsales.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 'G:\PleskVhosts\shenvalleyyardsales.com\httpdocs\feeds\yardsales.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 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 128:
Line 129:    Public Sub CreateAndPublishRSS(ByVal Yardsales As DataTable)
Line 130:        Dim fs As New System.IO.FileStream(Server.MapPath("") & "\feeds\yardsales.xml", FileMode.OpenOrCreate)
Line 131:
Line 132:        Dim writer As New StreamWriter(fs, New System.Text.UTF8Encoding)

Source File: G:\PleskVhosts\shenvalleyyardsales.com\httpdocs\Default.aspx.vb    Line: 130

Stack Trace:


[UnauthorizedAccessException: Access to the path 'G:\PleskVhosts\shenvalleyyardsales.com\httpdocs\feeds\yardsales.xml' is denied.]
   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +7942679
   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) +1162
   System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +61
   System.IO.FileStream..ctor(String path, FileMode mode) +55
   _Default.CreateAndPublishRSS(DataTable Yardsales) in G:\PleskVhosts\shenvalleyyardsales.com\httpdocs\Default.aspx.vb:130
   _Default.Page_Load(Object sender, EventArgs e) in G:\PleskVhosts\shenvalleyyardsales.com\httpdocs\Default.aspx.vb:30
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


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