Click here to Skip to main content
12,455,917 members (85,696 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET Server virtual
Server Error in '/' Application.
Access to the path 'C:\Inetpub\vhosts\\httpdocs\Reports\Logistics_Report_by_Employee_on_12_29_2013.pdf' 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\\httpdocs\Reports\Logistics_Report_by_Employee_on_12_29_2013.pdf' 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 and IIS 7, and the configured application pool identity on IIS 7.5) that is used if the application is not impersonating. If the application is impersonating via , 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:

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\vhosts\\httpdocs\Reports\Logistics_Report_by_Employee_on_12_29_2013.pdf' is denied.]
Himalaya.Reports.rptLogistics.btnSubmit_Click(Object sender, EventArgs e) in d:\New Projects\Projects\Himalaya\Himalaya\Reports\rptLogistics.aspx.cs:806
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9750842
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +196
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18408
Posted 28-Dec-13 21:30pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

[UnauthorizedAccessException: Access to the path 'C:\Inetpub\vhosts\\httpdocs\Reports\Logistics_Report_by_Employee_on_12_29_2013.pdf' is denied.]
The error message is quite clear. You are trying to do some File operations on the above mentioned path, but your application is not permitted to do so.

So, you need to provide access rights to that folder in the hosted Server.
shivarajkaroor 5-Jun-14 7:33am
how to provide access rights to that folder in the hosted Server.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 29 Dec 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100