Web Hosting, Domain Host, Webhosting, Windows Web Hosting, Web Design

Alien Hosts Web Hosting Providers
 
Alien Hosts Web Hosting Compare Our Hosting Plans & Options Sign -up For A Web Host PlanContact Alien Hosts
 

You Need Web hosting

Symptoms:

You are trying to write to a folder and you get an error such as this one received when trying to run an asp.net. application:

Server Error in '/CommerceCSVS' Application.

Access to the path "C:\Some\Path" 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:\Some\Path" 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.

 

Possible Cause:

your asp.net application is trying to access the folder, as a user (probably ASPNET), which does not have permission to access that folder.

Solution:

The answer is actually right there in the error message.
  1. Find the machine.config file on your local computer. the path will be something like:
    WinNT\Microsoft.NET\Framework\<version>\config\machine.config
    (it is a hidden file, so make sure that you allow a files to be viewed.)
  2. open the file, and find the line that looks like:
    <identity impersonate="false" userName="" password="" />
  3. change the line, so it looks like:
    <identity impersonate="true" userName="" password="" />
  4. save the file.
  5. run your application.

The problem should be resolved.

Why Not Trade Links with Alien Hosts - CLICK HERE

Website Hosts

[Back to Main]

 
Alien Hosts© 2003

Web Hosting, Domain Host, Webhosting, Windows Web Hosting, Web Design

Windows .Net Hosting at very affordable rates
Not interested in Windows .Net Hosting