Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4613244
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:31:11+00:00 2026-05-22T01:31:11+00:00

I have a WCF service that’s deployed as a Windows Azure Web Role. I’m

  • 0

I have a WCF service that’s deployed as a Windows Azure Web Role.

I’m using Enterprise Library for exception handling and in my local Development Fabric, exceptions seem to be handled and logged correctly using the Event Log Handler (logging to the Application event log).

When it’s running on Azure, while the Exception Policy seems to be being applied (as I’m observing correct handling of certain expected exceptions), nothing’s being logged to the Event Log.

Here’s the exception handling policy:

<add name="Entity">
  <exceptionTypes>
    <add name="All Exceptions"
         type="System.Exception, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
         postHandlingAction="NotifyRethrow">
      <exceptionHandlers>
        <add name="Logging Exception Handler"
             type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
             logCategory="General" 
             eventId="100" 
             severity="Error" 
             title="Enterprise Library Exception Handling"
             formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling"
             priority="0" />
      </exceptionHandlers>
    </add>
  </exceptionTypes>
</add>

And here’s the Logging configuration:

 <loggingConfiguration name="" tracingEnabled="true" defaultCategory="General">
   <listeners>
     <add name="Event Log Listener"
          type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
          listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" source="Enterprise Library Logging" formatter="Text Formatter"
          log="Application" 
          machineName="." 
          traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId, Callstack" />
  </listeners>
  <formatters>
    <add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
         template="Timestamp: {timestamp}{newline}&#xA;Message: {message}{newline}&#xA;Category: {category}{newline}&#xA;Priority: {priority}{newline}&#xA;EventId: {eventid}{newline}&#xA;Severity: {severity}{newline}&#xA;Title:{title}{newline}&#xA;Machine: {localMachine}{newline}&#xA;App Domain: {localAppDomain}{newline}&#xA;ProcessId: {localProcessId}{newline}&#xA;Process Name: {localProcessName}{newline}&#xA;Thread Name: {threadName}{newline}&#xA;Win32 ThreadId:{win32ThreadId}{newline}&#xA;Extended Properties: {dictionary({key} - {value}{newline})}" 
         name="Text Formatter" />
  </formatters>
  <categorySources>
    <add switchValue="All" name="General">
      <listeners>
        <add name="Event Log Listener" />
      </listeners>
    </add>
  </categorySources>
  <specialSources>
    <allEvents switchValue="All" name="All Events" />
    <notProcessed switchValue="All" name="Unprocessed Category" />
    <errors switchValue="All" name="Logging Errors &amp; Warnings">
      <listeners>
        <add name="Event Log Listener" />
      </listeners>
    </errors>
  </specialSources>
</loggingConfiguration>

Any idea what’s going wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:31:12+00:00Added an answer on May 22, 2026 at 1:31 am

    The best way to do logging is to use the diagnostic trace listener. The names for Event Logs in Windows Azure is different. To do with this Enterprise Library you will need to change from the Event Log listener to the Windows Azure Diagnostic Trace listener. We have more information about this in our book “Moving Applications to the Cloud“. The code is in VS 2008 but you can open in VS 2010 to see the samples. In the code and see how we setup Enterprise Library Logging with the Windows Azure Diagnostic Trace Listener. You will need to make sure to move the logs over to see the information. The book goes into detail about this.

    If you want to just get a quick look you can download the Music Application here from our codeplex site that shows how to use Enterprise Library with Windows Azure. This is older version that we are working to upgrade.

    More on tracing here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a WCF service that is hosted in a windows application. The service
I have a WCF service that I call from a windows service. The WCF
I have a WCF service that is using a custom ServiceAuthorizationManager . The custom
I have a WCF service that is running as a windows service. As soon
I have a WCF service that will be using basic authentication and would like
I have a WCF service that I'm using in my Silverlight project. I've followed
I have a WCF service that is hosted in a Windows Service. Clients that
I have a WCF service that is hosted on a Windows Service. Now I
I have a WCF service that is using webHttpBinding on an endpoint, and the
I have a WCF service that is hosted inside a Windows Service. The Windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.