However, I get the following error:
__________________________________________________________
Exception Details: System.UnauthorizedAccessException: Access to the path
"C:\Documents and Settings\Administrator\My Documents\My
Projects\ASPNETProjects\vsnet\ThreeTieredSolution\Orders.txt" 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.
__________________________________________________________

I could use any other folder, of course (it works just fine), but what if,
for keeping things tidy, I want to write in some subfolder of the app's path
?

I'm confused (I'm not strong on security...). In Explorer, I think that I
can only set NTFS security. Anyway, from Explorer, I select ASPNetProjects
Properties and on DefaultWebSite/Properties I can set
AccessPermissions/Write=ON and ApplicationPermissions = Scripts.

I go now in IIS Services and on ASPNetProjects Properties I can set Write=ON
(ApplicationSettings/Execute Permissions is set to Scripts Only). On the tab
Directory Security, under "Anonymous access and authentification control" I
have Anonymous Access set to ON, USER_NAME = "IUSR_RADU" (RADU is the name
of my machine), and I have "Allow IIS to control password" checked. I also
have under "Authenticated Access" the checkboxes "Basic Authentification"
set to on (but there's nothing in DefaultDomain and Realm) and "Integrated
Windows Authentifcation" also set to ON.

However, when i run my app, I get, as I have said before,
________________________________________
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.
_________________________________________

Plese shed some light on this - I can't seem to find my way around this
problem.

PS. Their advice(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.) does NOT apply (there is no
"Security" tab !)

PS. Something else - In IIS If I set "WRITE=true", I get a box saying "The
following child nodes also define the value of the "Access Permissions"
property.... etc. How do the child nodes do that ? I have looked in all the
files in my project, and there's no "Access Permission" clause...

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!