D
Damian
Hi
The following code is what I use to open the file
Dim sw As StreamWriter =
File.AppendText("C:\Inetpub\wwwroot\IView\log\errWebLog.txt")
These are the following permissons I have set:
The ASPNET account set to anonymous login.
The ASPNET account has read/write permissions on the folder
THe folder's properties in IIS has read/write set .
I get the following error message when i try and open and write to a
file in a directory under IIS :
System.UnauthorizedAccessException: Access to the path
"C:\Inetpub\wwwroot\IView\log\errWebLog.txt" is denied. at
System.IO.__Error.WinIOError(Int32 errorCode, String str) at
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean useAsync, String
msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String
path, FileMode mode, FileAccess access, FileShare share, Int32
bufferSize) at System.IO.StreamWriter.CreateFile(String path, Boolean
append) at System.IO.StreamWriter..ctor(String path, Boolean append,
Encoding encoding, Int32 bufferSize) at
System.IO.StreamWriter..ctor(String path, Boolean append) at
System.IO.File.AppendText(String path) at
IView.quotethanks.WriteError(String errStr) in
C:\Inetpub\wwwroot\IView\quotethanks.aspx.vb:line 176
Any help will be appreciated
Thanks
The following code is what I use to open the file
Dim sw As StreamWriter =
File.AppendText("C:\Inetpub\wwwroot\IView\log\errWebLog.txt")
These are the following permissons I have set:
The ASPNET account set to anonymous login.
The ASPNET account has read/write permissions on the folder
THe folder's properties in IIS has read/write set .
I get the following error message when i try and open and write to a
file in a directory under IIS :
System.UnauthorizedAccessException: Access to the path
"C:\Inetpub\wwwroot\IView\log\errWebLog.txt" is denied. at
System.IO.__Error.WinIOError(Int32 errorCode, String str) at
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess
access, FileShare share, Int32 bufferSize, Boolean useAsync, String
msgPath, Boolean bFromProxy) at System.IO.FileStream..ctor(String
path, FileMode mode, FileAccess access, FileShare share, Int32
bufferSize) at System.IO.StreamWriter.CreateFile(String path, Boolean
append) at System.IO.StreamWriter..ctor(String path, Boolean append,
Encoding encoding, Int32 bufferSize) at
System.IO.StreamWriter..ctor(String path, Boolean append) at
System.IO.File.AppendText(String path) at
IView.quotethanks.WriteError(String errStr) in
C:\Inetpub\wwwroot\IView\quotethanks.aspx.vb:line 176
Any help will be appreciated
Thanks