System.UnauthorizedAccessException: Access to the path ...Temporary ASP.NET Files.. is denied.

Discussion in 'ASP .Net' started by Anbu, Feb 24, 2006.

  1. Anbu

    Anbu Guest

    Hi all,

    I have developed an application in VS .NET 2003 (framework 1.1) on a XP
    platform. It is working fine in that PC.

    Now, I setup new PC with same configuration for another develper.
    Whenever I execute the application it gives, Unauthorize Exception
    error and it's not execting the application property.

    The Error message is as follows,
    ===============================================================

    Server Error in '/myApp' Application.
    --------------------------------------------------------------------------------

    Access to the path
    "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
    Files\myApp\dc572ed2\cf08d790\hash.web" 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:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
    Files\myApp\dc572ed2\cf08d790\hash.web" 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.


    ===============================================================

    During the investigation I found that there is no folder called myApp
    created under the "Temporary ASP .NET Files". I have set full privilege
    to the ASPNET user account and to the Developer.

    Nothing has been changed in the Web.Config also.

    How can I solve the problem? TIA.
     
    Anbu, Feb 24, 2006
    #1
    1. Advertising

  2. Hi Anbu,
    Go to the C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
    Files
    And give the folder "ASPNET acct" at leasr read and right permissions.
    Since you are using WIN XP you might not see the SECURITY OPTIONS if you
    right clcik
    If thats the case just go to TOOLS in your Explorer >Folder Options > View
    and uncheck "Use simple file sharing(recommended)"
    Hope that helps
    Patrick


    "Anbu" <> wrote in message
    news:...
    > Hi all,
    >
    > I have developed an application in VS .NET 2003 (framework 1.1) on a XP
    > platform. It is working fine in that PC.
    >
    > Now, I setup new PC with same configuration for another develper.
    > Whenever I execute the application it gives, Unauthorize Exception
    > error and it's not execting the application property.
    >
    > The Error message is as follows,
    > ===============================================================
    >
    > Server Error in '/myApp' Application.
    > --------------------------------------------------------------------------------
    >
    > Access to the path
    > "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
    > Files\myApp\dc572ed2\cf08d790\hash.web" 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:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
    > Files\myApp\dc572ed2\cf08d790\hash.web" 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.
    >
    >
    > ===============================================================
    >
    > During the investigation I found that there is no folder called myApp
    > created under the "Temporary ASP .NET Files". I have set full privilege
    > to the ASPNET user account and to the Developer.
    >
    > Nothing has been changed in the Web.Config also.
    >
    > How can I solve the problem? TIA.
    >
     
    Patrick.O.Ige, Feb 25, 2006
    #2
    1. Advertising

  3. Anbu

    Anbu Guest

    Patrick,

    Thanks for your reply. I was not working properly. I'm replacing the
    fresh image on the system, to try from scratch.
     
    Anbu, Feb 27, 2006
    #3
  4. Anbu

    Anbu Guest

    All the privileges given to the user ASPNET and the developer. No idea
    why it's not working...

    Even I tried to replace the system with the new image as in the
    previous post. I desperately require some help
     
    Anbu, Feb 27, 2006
    #4
  5. Anbu

    Anbu Guest

    Since I used impersonate=true, i had to set access privilege to the
    impersonated user. It's working fine now.
     
    Anbu, Mar 9, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. S. Justin Gengo
    Replies:
    0
    Views:
    866
    S. Justin Gengo
    Jul 14, 2003
  2. Tushar Shelar
    Replies:
    2
    Views:
    9,515
    Tushar Shelar
    Jan 14, 2005
  3. Rama Krishna
    Replies:
    0
    Views:
    313
    Rama Krishna
    Oct 22, 2003
  4. Rama Krishna
    Replies:
    0
    Views:
    173
    Rama Krishna
    Oct 22, 2003
  5. Bill Nguyen
    Replies:
    4
    Views:
    467
    Paul Glavich [MVP ASP.NET]
    Feb 20, 2005
Loading...

Share This Page