Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > "Access to the path "...PortalCfg.xml" is denied

Reply
Thread Tools

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

 
 
Winterminute
Guest
Posts: n/a
 
      12-03-2003
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: }


 
Reply With Quote
 
 
 
 
Winterminute
Guest
Posts: n/a
 
      12-03-2003
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" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
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: }


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
403 Forbidden: You were denied access because: Access denied by access control list Southern Kiwi NZ Computing 6 03-19-2006 05:19 AM
"Access to the path <path> is denied" but it shouldn't be. Kent Tegels ASP .Net Security 0 08-26-2004 04:43 PM
Access to the path is denied Theerachet Pratoommanee ASP .Net 1 12-30-2003 09:03 AM
Re: System.UnauthorizedAccessException: Access to the path <file> is denied. (framework 1.1) S. Justin Gengo ASP .Net 0 07-14-2003 02:00 PM
Access to the path ...\\dynamic_images is denied. What Happens??? cg ASP .Net 0 07-02-2003 07:29 AM



Advertisments