"Access to the path "...PortalCfg.xml" is denied

Discussion in 'ASP .Net' started by Winterminute, Dec 3, 2003.

  1. Winterminute

    Winterminute Guest

    If I try to make any changes to the ASP.NET Portal Starter kit it fails with
    an access denied error.

    This was working when I left last week and is failing today. I don't
    remember changing anything, but I guess something had to be changed. I
    have checked NTFS permissions and the ASPNET account has full control on the
    parent directory of that XML file and on the file itself. I have also
    checked in IIS, and the Virtual Directory has "write" allowed. The funny
    thing is that the change I am trying to make works! So if I reload the page
    I see the change, but attempting to make another change results in the
    error.


    Here is the full error:
    (I can post the entire stack trace if you want)

    Server Error in '/PortalCSVS' Application.

    Access to the path "C:\Program Files\ASP.NET Starter Kits\ASP.NET Portal
    (CSVS)\PortalCSVS\PortalCfg.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:\Program Files\ASP.NET Starter Kits\ASP.NET Portal
    (CSVS)\PortalCSVS\PortalCfg.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 776:
    Line 777: // Object is evicted from the Cache here.
    Line 778: siteSettings.WriteXml(configFile);
    Line 779: }
    Line 780: }
     
    Winterminute, Dec 3, 2003
    #1
    1. Advertising

  2. Winterminute

    Winterminute Guest

    I found out that in Windows 2003, ASPNET isn't used for permissions if IIS is running under "Network Service", so once I get permissions to the Network Service Account and did an IISRESET, it worked!
    "Winterminute" <> wrote in message news:...
    If I try to make any changes to the ASP.NET Portal Starter kit it fails with
    an access denied error.

    This was working when I left last week and is failing today. I don't
    remember changing anything, but I guess something had to be changed. I
    have checked NTFS permissions and the ASPNET account has full control on the
    parent directory of that XML file and on the file itself. I have also
    checked in IIS, and the Virtual Directory has "write" allowed. The funny
    thing is that the change I am trying to make works! So if I reload the page
    I see the change, but attempting to make another change results in the
    error.


    Here is the full error:
    (I can post the entire stack trace if you want)

    Server Error in '/PortalCSVS' Application.

    Access to the path "C:\Program Files\ASP.NET Starter Kits\ASP.NET Portal
    (CSVS)\PortalCSVS\PortalCfg.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:\Program Files\ASP.NET Starter Kits\ASP.NET Portal
    (CSVS)\PortalCSVS\PortalCfg.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 776:
    Line 777: // Object is evicted from the Cache here.
    Line 778: siteSettings.WriteXml(configFile);
    Line 779: }
    Line 780: }
     
    Winterminute, Dec 3, 2003
    #2
    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. Theerachet Pratoommanee

    Access to the path is denied

    Theerachet Pratoommanee, Dec 30, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    8,386
    Sachin Kharsani[MSFT]
    Dec 30, 2003
  2. cg
    Replies:
    0
    Views:
    484
  3. S. Justin Gengo
    Replies:
    0
    Views:
    883
    S. Justin Gengo
    Jul 14, 2003
  4. Jay
    Replies:
    2
    Views:
    1,108
  5. Kent Tegels
    Replies:
    0
    Views:
    243
    Kent Tegels
    Aug 26, 2004
Loading...

Share This Page