By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,564 Members | 1,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,564 IT Pros & Developers. It's quick & easy.

Exception Handling Application Block

P: n/a
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
Jun 27 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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" <Po*******@discussions.microsoft.comwrote in message
news:D1**********************************@microsof t.com...
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

Jun 27 '08 #2

P: n/a
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:
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" <Po*******@discussions.microsoft.comwrote in message
news:D1**********************************@microsof t.com...
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
Jun 27 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.