IIS 7 - Writing Log Files
I have ran into a problem while using NLog with web application – logs not created when application is deployed to IIS. Everything would indicate that this is permissions issue, except that I couldn’t figure out what account my web application was running under. Under II6 it was simple – IUSR, but with IIS 7 things have changed a little. Then I learned about Application Pool Identities. Very interesting, especially when locating an account DefaultAppPool resolves nothing, but IIS AppPool\DefaultAppPool does find DefaultAppPool. Either way, once I set write permissions for DefaultAppPool on the web application folder controlled by IIS, my problems were solved.
Moral of this story – when working with new things (IIS in this case), make sure you know read the manual. Just “clicking” it might be quite expensive (time wise).