Are you running on Windows 2000/XP or Windows 2003 Server
By defaut, on Windows 2000/XP, ASP.NET pages run in the aspnet_wp.exe
process, and the process identity for tha process is Machine\ASPNET
On Windows 2003 Server, ASP.NET pages run in w3wp.exe process, and the
default process identity is NT Authority\Network Service.
You will need to give the appropriate account read/write NTFS permissions to
that file.
If you are using other accounts, or are impersonating, then please provide
details of your current configuration in that respect.
A troubleshooting tool you can use is Filemon from
www.sysinternals.com,
which will tell you what account is being denied access to what.
Cheers
Ken
"Tony" <> wrote in message
news:3EDC0B2C-8A7E-46A3-A7E5-...
:I am trying (unsuccessfully) to open a file using fso.OpenTextFile. I have
: given Full Trust to the assembly in Code Groups and Assembly Trust. I have
: added IUSR and IWAM as users. I have checked and double checked every
: permission available. I continue to get a Security Exception error off of
: this code:
:
:
: Dim epth As String = Server.MapPath("/error/errlog.log")
: Dim fso As New Scripting.FileSystemObject
:
: fso = Server.CreateObject("Scripting.FileSystemObject")
: f = fso.OpenTextFile(epth, IOMode.ForAppending, True)
: f.WriteLine("[" & DateString & "][" & TimeString & "] Module
: 'hs.aspx:

age_Load::General', " & "Error " & Err.Number & ": " &
: Err.Description)
: f.Close()
: Server.Transfer("/hsp/error/100.htm")
:
: The error I get is this:
:
: System.Security.SecurityException: Exception from HRESULT: 0x800A0046
: (CTL_E_PERMISSIONDENIED).