Allowing IIS6 IUSR account to write to the event log
I have an ASP.NET app that has a class that writes to the event log. Now it has been working fine when called from a WF Work Flow , as the WF runs under the app pool account (Network Service).
Now I want to use this event log class in an aspx pa开发者_StackOverflow中文版ge, which is where I am running into trouble becuase the aspx page is running under the IUSR account and I get an Access is Denied error, stating "Cannot open log for source 'XXX'. You may not have write access.".
Now my question is, how can I give the IUSR account permission to write to the event log, or is there another, better (not overly complicated), way?
Thanks in advance.
I think as long as an event source is available, the IUSR or other user accounts, can write to the event log under that event source.
So this is what I do to solve that problem. Aside from creating the event source in my installation, I have an executable I distribute with my ASP.NET applications which will allow the user to create the event source when logged in as an admin, which they always are when managing the web server.
After this event source has been added by an admin, the IUSR account can write to the event log (windows application event log in my case).
I hope this helps.
精彩评论