pgrimes
Jan 7th, 2004, 03:32 PM
I'm having a problem with my asp.net app when I try to run it on windows xp pro. Below is the error I'm getting when I try to download a file and save it to the disk. I'm pretty sure the problem occurs because windows xp makes all the directories "read-only". The error is "Access to the path xxx is denied." The line it occurs on is below, in red.
Please help, this is urgent for me. Thanks.
Server Error in '/Caltrans_CPT_Previewer/XMLtoSVG' Application.
--------------------------------------------------------------------------------
Access to the path "C:\Caltrans_CPT_Previewer\XMLtoSVG\LAData\temp\tmp.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:\Caltrans_CPT_Previewer\XMLtoSVG\LAData\temp\tmp.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:
Line 40: xmlURL = "http://www.webhippo.com/temp/00-488.xml"
Line 41: End If
Line 42: myWebClient.DownloadFile(xmlURL, Request.ServerVariables("APPL_PHYSICAL_PATH") & "LAData\temp\tmp.xml")
Line 43: 'xmlURL = "http://www.webhippo.com/temp/00-488.xml"
Line 44: xmlDownloadDestination = Request.ServerVariables("APPL_PHYSICAL_PATH") & "LAData\temp\tmp.xml"
Please help, this is urgent for me. Thanks.
Server Error in '/Caltrans_CPT_Previewer/XMLtoSVG' Application.
--------------------------------------------------------------------------------
Access to the path "C:\Caltrans_CPT_Previewer\XMLtoSVG\LAData\temp\tmp.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:\Caltrans_CPT_Previewer\XMLtoSVG\LAData\temp\tmp.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:
Line 40: xmlURL = "http://www.webhippo.com/temp/00-488.xml"
Line 41: End If
Line 42: myWebClient.DownloadFile(xmlURL, Request.ServerVariables("APPL_PHYSICAL_PATH") & "LAData\temp\tmp.xml")
Line 43: 'xmlURL = "http://www.webhippo.com/temp/00-488.xml"
Line 44: xmlDownloadDestination = Request.ServerVariables("APPL_PHYSICAL_PATH") & "LAData\temp\tmp.xml"