View Single Post
  #2 (permalink)  
Old December 17th, 2003, 09:48 PM
cjo cjo is offline
Authorized User
Join Date: Oct 2003
Location: Smyrna, Georgia, USA.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts

If you don't alread have a web.config file do this:

Create a new file and save it as "web.config" in either your root directory or the directory that contains the code that is trying to create the event log. Copy and paste the xml contents below into this file. Be sure to replace your actual computername/username and password (the same info you use to log into Windows) in the "identity" element below. Then attempt to run the code again. I had the same error, and this worked for me. Good luck!

<?xml version="1.0" encoding="UTF-8" ?>
<identity impersonate="true" userName="COMPUTERNAME\USername" password="password" />

P.S. If you're already using a web.config file, then just add the identity element as shown above within the system.web element.