Click here to Skip to main content
15,886,664 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Server Error in '/' Application.
Access to the path 'C:\Inetpub\vhosts\sssinfracity.com\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\sssinfracity.com\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 <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:

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\sssinfracity.com\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

1 solution

Quote:
[UnauthorizedAccessException: Access to the path 'C:\Inetpub\vhosts\sssinfracity.com\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.
 
Share this answer
 
Comments
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900