ASP.NET 2.0 Write File (IIS 6.0/Windows 2003)

  • Thread starter Thread starter Henok Girma
  • Start date Start date
H

Henok Girma

Hello,
I wanted to write to a folder from my ASP.NET web app, but i get

Access to the path 'C:\Inetpub\wwwroot\Test\Logs\test.log' is denied. at
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access,
Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize,
FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean
bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode,

here is what i did

i created a Virtual Directory Test
under it there is a folder Logs
i set the propery from IIS of the logs folder to 'write'

i changed the security permission of the folder from windows explorer(right
click|properties)
and added the user IUSR_<MachineName> and ASPNET user.. i gave both users
FULL ACCESS, yet i am still not able to write to that folder.

am I missing something?

any help is greatly appreciated
 
Back
Top