views:

405

answers:

1

Hi - For an ASP.Net environment what permissions should the logging file created by NLog have ? The ASP.Net virtual directory is using an application pool which has an 'Application Pool Identity' of 'Network Service'.

When I grant 'Network Service' change rights to the NLog output file all is well until the archiving condition causes the initial log file to become X_0001 and a new X to be created - the new X now longer has any rights for 'Network Service' and so an error is generated when the ASP.Net scripts try to write to it.

I can't find any reference to this on the NLog site. Any info welcomed.

+1  A: 

Assign permissions to a folder and make sure permissions get inherited by the files created in this folder. This way any new file create will automatically get permissions you need.

DmitryK