R – Network service vs AspNet (Asp.Net Machine Account)

asp.netiispermissions

I've a small asp.net application which write logs on the file system in a directory 'Logs'.

I've given the modify permission to Asp.Net machine account for this folder which works fine. However when I tried to deployed it to the another server it doesn't work. I have to give the same modify permission to Network service account also. Why?

Best Answer

Because that's the account that's used to run the application pools under. So on IIS6 and 7 this will be the case. On workstations with IIS5, you won't have application pools, and so the ASP.NET worker process runs under the local ASPNET account.

Also, it's better to grant the permissions on the IIS_WPG local group, of which the Network Service is a member.