Wednesday 1 November 2006

We've now got our new application server running, and we're moving all of our Web applications over. The new server uses Windows Server 2003 R2, which has tighter security than the previous version, and that has slowed us down a little bit.

In particular, the Feedback feature on a number of our Websites writes to the Application Log if it encounters an exception. Only, a Website running as NETWORK SERVICE doesn't have permission to create new event sources. So we got an unhandled SecurityException every time we tried to send Feedback.

Here's the offending line of code:

EventLog.CreateEventSource(eventSource, logName);

The solution (shown below; open the image in another window to see it full-size) was to give the NETWORK SERVICE permission to create event sources. (Another option was to make all of the Web sites on the server run as Local System. This violates the Principle of Least Privilege, so we rejected it.)

Comments are closed.
Search
Navigation
Categories
On this page....
Archives
<November 2008>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
Total Posts: 65
This Year: 1
This Month: 0
This Week: 0
Comments: 9
Blogroll
Contact me
Send mail to the author(s) E-mail RSS 2.0 Atom 1.0
Administration