?
Solved

Exception Management Application Block - Custom Publisher - HOW??

Posted on 2004-04-26
5
Medium Priority
?
476 Views
Last Modified: 2013-12-03
Greetings
I'm following Microsoft's instructions to create a custom exception publisher, but no matter what I try, it keeps sending my errors to the DefaultPublisher.
My main project is called RMSC.ACME; the output is RMSC.ACME.exe.  As per MS's instructions, I created a RMSC.ACME.exe.config file, containing the following:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="exceptionManagement"
       type="Microsoft.ApplicationBlocks.ExceptionManagement
       .ExceptionManagerSectionHandler,
       Microsoft.ApplicationBlocks.ExceptionManagement" />
  </configSections>
      
  <exceptionManagement>
    <publisher mode="on" assembly="RMSC.Errors"
       type="RMSC.Errors.RMSCExceptionPublisher"
       connectString="blahblah"
       operatorMail="admin@blah.com" />
  </exceptionManagement>
</configuration>

Then I have another project called RMSC.Errors, which contains a class called RMSCExceptionPublisher, in the namespace RMSC.Errors, which implements IExceptionPublisher.  RMSC.ACME references RMSC.Errors.

Any ideas why I'm still getting the default publisher?

Thanks,
Shaul
0
Comment
Question by:saulbehr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 10916300
Hi check this...

Configuring a Custom Publisher

After we creating a custom publisher component, we need to attach it with the Exception Manager. For this we use a .NET XML configuration file for Application. The following configuration file format shows how to configure the custom publisher.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>

<configSections>
<section name="exceptionManagement" type=
"Microsoft.ApplicationBlocks.ExceptionManagement.ExceptionManagerSectionHandler,Microsoft
.ApplicationBlocks.ExceptionManagement" />
</configSections>

<exceptionManagement mode="on">
<publisher assembly="CustomExceptionManagement"
type="CustomExceptionManagement.ExceptionPublisher"
operatorMail="seenivasa.ramadurai@its.verizon.com" />
<publisher assembly="CustomExceptionManagement"
type="CustomExceptionManagement.ExceptionPublisher" fileName="c:\VZMoneyError.txt" />
<publisher assembly="CustomExceptionManagement" type="CustomExceptionManagement.ExceptionXMLPublisher" exceptionFormat="xml" fileName="c:\VZMoneyError.XML" />
<publisher assembly="CustomExceptionManagement" type="CustomExceptionManagement.ExceptionXMLPublisher" exceptionFormat="xml" operatorMail="Nageswara.Tripuramallu@its.verizon.com" />
<publisher assembly="CustomExceptionManagement" type="CustomExceptionManagement.ExceptionXMLPublisher" exceptionFormat="xml"
MSMQName=".\ErrorLogsQ" />
</exceptionManagement>

</configuration>


best of luck..

R.K
0
 
LVL 23

Accepted Solution

by:
rama_krishna580 earned 1500 total points
ID: 10916324
0
 

Author Comment

by:saulbehr
ID: 10916487
R.K:

Thanks for this - I already had this code.  The problem is that my application IGNORES the .config file altogether, and uses the DefaultPublisher anyway.
Is there some trick in the naming convention?  Or is there an explicit setting on the project that will make it use my .config file?
Maybe there's a problem because my project has a "." in the name - "RMSC.ACME"?

Thanks,
Shaul
0
 

Author Comment

by:saulbehr
ID: 10916517
Actually, I just answered that question myself: you need to name the file "App.config".
I was naming it "RMSC.ACME.exe.config"... well, live and learn.
BTW, this is not explicit anywhere in the Microsoft documentation - that documentation is exactly what led me to name the config file "AppName.exe.config".

Still, you pointed me at the article on codeguru.com that explained the solution - so the points are yours.

Thanks!
Shaul
0
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 10916594
Hi Shaul,

i will always be there to help...
once again thank you foe accepting and
i will look forward to help you on more things in future..

best of luck..

R.K

0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question