Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 19th, 2005, 10:33 AM
Registered User
 
Join Date: Aug 2004
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
 
Old August 19th, 2005, 11:15 PM
Friend of Wrox
 
Join Date: Nov 2003
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.

 
Old August 22nd, 2005, 10:29 AM
Registered User
 
Join Date: Aug 2004
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.
 
Old August 22nd, 2005, 11:19 AM
Friend of Wrox
 
Join Date: Nov 2003
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.






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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.