Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 19th, 2005, 10:33 AM
Registered User
 
Join Date: Aug 2004
Location: , , USA.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Event Log

Hello.

I am writing my first ASP.NET web app, to which I have added an event log. The event log works flawlessly from one page in the app, but I get an "Access is denied" error when trying to write to the log from another page in the same application. Do I need to add a separate event log to each page in the app? Any suggestions will be greatly appreciated.

Thanks, Donna
  #2 (permalink)  
Old August 19th, 2005, 11:15 PM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

How are you creating an event log? Are you writing to a text file, or inserting into a database table? In either case, I would create a function in a class to do this to avoid repetative code.

  #3 (permalink)  
Old August 22nd, 2005, 10:29 AM
Registered User
 
Join Date: Aug 2004
Location: , , USA.
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I created a log using the event log icon in the toolbox and using the WriteEvent method. However, I like the idea of using a table better. So, I am going to use a Try...Catch block and write a stored procedure to save the error string to a table. I think this will make tracking and repairing errors easier for all involved. Thanks for your reply.:)

Quote:
quote:Originally posted by jbenson001
 How are you creating an event log? Are you writing to a text file, or inserting into a database table? In either case, I would create a function in a class to do this to avoid repetative code.
  #4 (permalink)  
Old August 22nd, 2005, 11:19 AM
Friend of Wrox
Points: 4,332, Level: 27
Points: 4,332, Level: 27 Points: 4,332, Level: 27 Points: 4,332, Level: 27
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2003
Location: , NJ, USA.
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

   Having it in the database also makes it good for reporting and viewing errors easily.

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to log to server's event log LenexaKS Access VBA 4 March 11th, 2008 12:49 PM
AppException Class -Log Error to Event Log bekim BOOK: ASP.NET Website Programming Problem-Design-Solution 7 December 7th, 2004 01:01 PM
Security exception comes when writing to event log s_vermani BOOK: Beginning ASP.NET 1.0 4 October 21st, 2004 09:17 AM
Checking Security Event log for failed logins Ronb722 VBScript 2 September 29th, 2004 10:04 AM
Event log to a text file jackchua BOOK: ASP.NET Website Programming Problem-Design-Solution 2 May 17th, 2004 09:54 PM



All times are GMT -4. The time now is 10:30 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.