G
Guest
I am trying (unsuccessfully) to open a file using fspenTextFile. 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 = fspenTextFile(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).
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 = fspenTextFile(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).