views:

328

answers:

2

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?

A: 

Because on your local machine IIS worker process runs under Asp.Net machine account but on a windows server IIS worker process runs under Network service account.

Numenor
Thanks for your comment.Both are Windows 2003 Server R2. So In this case the process must run under Network Service Account only. Why do we have this difference then?
Aakash
+1  A: 

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.

Wim Hollebrandse
+1 for IIS_WPG permission
Rubens Farias
I've IIS 6 on both servers. So in this case does this make difference?
Aakash
In that case, you should only be needing ACL's on the IIS_WPG group. Unless someone's fiddled with the identity of one of the AppPools to make it run under ASPNET...
Wim Hollebrandse
I've found a little difference but doesn't know if that is helpful in this case. One server have the IIS 5.0 Isolation checked but another not.
Aakash
IIS 5 Isolation mode doesn't use Application Pools, so that explains the difference you're seeing. You shouldn't run IIS 5 Isolation mode *unless* you run ASP.NET 1.0 apps.
Wim Hollebrandse