Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Exception Handling Application Block

Reply
 
Old 05-15-2008   #1 (permalink)
Polly Anna


 
 

Exception Handling Application Block

Hi,

I am using the Exception Handling Application Block, which is lovely. I
have been able to create a flat file as well as create an entry in the Event
Log.

However I am unable to create an entry into the database using the database
trace listener. I followed the following steps -

1/ I have added a database trace listener to my Exception Handling
Application Block.

2/ I have configured the connection string which includes a user name and
password. (I was able to test the connection to the db using an udl file)

3/ I have added the trace listener to Special Sources > All events

4/ I have created a category (I called it DBCategory) in Category Sources
for the database trace listener.

5/ I have created a Policy (I called it DBLog Policy) that has a Logging
Handler which references the Log Category above (DBCategory)

When I use the policy in my code, it does not make an entry into the Message
table of the special logging db.

Please can someone help me. I would be most grateful for any help or
pointers.


Kind regards,

Polly Anna



My System SpecsSystem Spec
Old 05-16-2008   #2 (permalink)
Jeff Winn


 
 

Re: Exception Handling Application Block

I had to do something similar before when we needed to be able to log across
all of our applications into a single database. You might want to check out
the project I wrote on CodePlex to get some ideas about what you could do
with it rather than using the built in mechanisms.

http://www.codeplex.com/NException

"Polly Anna" <PollyAnna@xxxxxx> wrote in message
news112116D-BBCE-41CD-824C-1FFB60B978BF@xxxxxx
Quote:

> Hi,
>
> I am using the Exception Handling Application Block, which is lovely. I
> have been able to create a flat file as well as create an entry in the
> Event
> Log.
>
> However I am unable to create an entry into the database using the
> database
> trace listener. I followed the following steps -
>
> 1/ I have added a database trace listener to my Exception Handling
> Application Block.
>
> 2/ I have configured the connection string which includes a user name and
> password. (I was able to test the connection to the db using an udl file)
>
> 3/ I have added the trace listener to Special Sources > All events
>
> 4/ I have created a category (I called it DBCategory) in Category Sources
> for the database trace listener.
>
> 5/ I have created a Policy (I called it DBLog Policy) that has a Logging
> Handler which references the Log Category above (DBCategory)
>
> When I use the policy in my code, it does not make an entry into the
> Message
> table of the special logging db.
>
> Please can someone help me. I would be most grateful for any help or
> pointers.
>
>
> Kind regards,
>
> Polly Anna
>
>
My System SpecsSystem Spec
Old 05-17-2008   #3 (permalink)
Polly Anna


 
 

Re: Exception Handling Application Block

Hi Jeff,

thank you very very much. It is all working now and I am so grateful.
Thank you.

Kind regards,

Polly Anna

"Jeff Winn" wrote:
Quote:

> I had to do something similar before when we needed to be able to log across
> all of our applications into a single database. You might want to check out
> the project I wrote on CodePlex to get some ideas about what you could do
> with it rather than using the built in mechanisms.
>
> http://www.codeplex.com/NException
>
> "Polly Anna" <PollyAnna@xxxxxx> wrote in message
> news112116D-BBCE-41CD-824C-1FFB60B978BF@xxxxxx
Quote:

> > Hi,
> >
> > I am using the Exception Handling Application Block, which is lovely. I
> > have been able to create a flat file as well as create an entry in the
> > Event
> > Log.
> >
> > However I am unable to create an entry into the database using the
> > database
> > trace listener. I followed the following steps -
> >
> > 1/ I have added a database trace listener to my Exception Handling
> > Application Block.
> >
> > 2/ I have configured the connection string which includes a user name and
> > password. (I was able to test the connection to the db using an udl file)
> >
> > 3/ I have added the trace listener to Special Sources > All events
> >
> > 4/ I have created a category (I called it DBCategory) in Category Sources
> > for the database trace listener.
> >
> > 5/ I have created a Policy (I called it DBLog Policy) that has a Logging
> > Handler which references the Log Category above (DBCategory)
> >
> > When I use the policy in my code, it does not make an entry into the
> > Message
> > table of the special logging db.
> >
> > Please can someone help me. I would be most grateful for any help or
> > pointers.
> >
> >
> > Kind regards,
> >
> > Polly Anna
> >
> >
>
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Exception Handling - Get-WmiObject on multiple servers PowerShell
Structured Exception Handling Overwrite Protection Vista News
Using Enterprise Library 4.0 Exception Handling Application Block .NET General
Custom Exception Handling And Logging using EnterPrise Library app .NET General
Exception handling in Vista Application Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46