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

W

Winterminute

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: }
 
W

Winterminute

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!
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: }
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top