ExceptionHandlingBlock error

Last post 09-23-2009 6:52 AM by Deidn. 2 replies.

Sort Posts:

  • ExceptionHandlingBlock error

    09-18-2009, 9:38 AM
    • Member
      11 point Member
    • Deidn
    • Member since 04-17-2009, 4:13 AM
    • Posts 25

    Hi

    In my project I use exception handling block from enterprise services. There it seems like the policy I created would not be found. But please have a look first:

    Here you can find the error message and an overview over the project.

    And here's my (full) app.config file:

    <?xml version="1.0"?>
    <configuration>
      <configSections>
        <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" />
        <section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" />
        <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        <section name="openaccess" type="Telerik.OpenAccess.Config.ConfigSectionHandler, Telerik.OpenAccess.Config, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342" requirePermission="false" />
      </configSections>
      <loggingConfiguration name="Logging Application Block" tracingEnabled="true"
        defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
        <listeners>
          <add databaseInstanceName="XIS" writeLogStoredProcName="WriteLog"
            addCategoryStoredProcName="AddCategory" formatter="database formatter"
            listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Database.Configuration.FormattedDatabaseTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging.Database, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.Database.FormattedDatabaseTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging.Database, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            name="Database Trace Listener" />
          <add fileName="C:\Temp\XIS.log" header="----------------------------------------"
            footer="----------------------------------------" formatter="Text Formatter"
            listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            traceOutputOptions="None" filter="All" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            name="FlatFile XIS TraceListener" />
        </listeners>
        <formatters>
          <add template="Timestamp: {timestamp}
    
    Message: {message}
    
    Category: {category}
    
    Priority: {priority}
    
    EventId: {eventid}
    
    Severity: {severity}
    
    Title:{title}
    
    Machine: {machine}
    
    Application Domain: {appDomain}
    
    Process Id: {processId}
    
    Process Name: {processName}
    
    Win32 Thread Id: {win32ThreadId}
    
    Thread Name: {threadName}
    
    Extended Properties: {dictionary({key} - {value}
    
    )}"
            type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            name="Text Formatter" />
          <add template="Timestamp: {timestamp}
    
    Message: {message}
    
    Category: {category}
    
    Priority: {priority}
    
    EventId: {eventid}
    
    Severity: {severity}
    
    Title:{title}
    
    Machine: {machine}
    
    Application Domain: {appDomain}
    
    Process Id: {processId}
    
    Process Name: {processName}
    
    Win32 Thread Id: {win32ThreadId}
    
    Thread Name: {threadName}
    
    Extended Properties: {dictionary({key} - {value}
    
    )}"
            type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
            name="database formatter" />
        </formatters>
        <categorySources>
          <add switchValue="All" name="General">
            <listeners>
              <add name="Database Trace Listener" />
            </listeners>
          </add>
        </categorySources>
        <specialSources>
          <allEvents switchValue="All" name="All Events">
            <listeners>
              <add name="Database Trace Listener" />
            </listeners>
          </allEvents>
          <notProcessed switchValue="All" name="Unprocessed Category">
            <listeners>
              <add name="Database Trace Listener" />
            </listeners>
          </notProcessed>
          <errors switchValue="All" name="Logging Errors & Warnings">
            <listeners>
              <add name="Database Trace Listener" />
            </listeners>
          </errors>
        </specialSources>
      </loggingConfiguration>
      <exceptionHandling>
        <exceptionPolicies>
          <add name="General">
            <exceptionTypes>
              <add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                postHandlingAction="None" name="Exception">
                <exceptionHandlers>
                  <add logCategory="General" eventId="100" severity="Error" title="General"
                    formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.XmlExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                    priority="0" useDefaultLogger="true" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                    name="General" />
                </exceptionHandlers>
              </add>
            </exceptionTypes>
          </add>
          <add name="XIS Exception Policy">
            <exceptionTypes>
              <add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                postHandlingAction="None" name="Exception">
                <exceptionHandlers>
                  <add logCategory="General" eventId="100" severity="Error" title="XIS Ex Handler"
                    formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                    priority="0" useDefaultLogger="true" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
                    name="XISLogging Handler" />
                </exceptionHandlers>
              </add>
            </exceptionTypes>
          </add>
        </exceptionPolicies>
      </exceptionHandling>
      <dataConfiguration defaultDatabase="XIS" />
      <connectionStrings>
        <add name="XIS" connectionString="data source=ROB\ROB;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
          providerName="System.Data.SqlClient" />
      </connectionStrings>
      <enterpriseLibrary.ConfigurationSource selectedSource="System Configuration Source">
        <sources>
          <add name="System Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.SystemConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
        </sources>
      </enterpriseLibrary.ConfigurationSource>
      <openaccess xmlns="http://www.vanatec.com/OpenAccess">
        <references>
          <reference assemblyname="XSite.XIS.DataModel" configrequired="True" />
        </references>
        <connections>
          <connection id="XISConnection">
            <databasename>XIS</databasename>
            <servername>ROB\ROB</servername>
            <integratedSecurity>True</integratedSecurity>
            <backendconfigurationname>mssqlConfiguration</backendconfigurationname>
          </connection>
        </connections>
        <backendconfigurations>
          <backendconfiguration id="mssqlConfiguration" backend="mssql">
            <mappingname>mssqlMapping</mappingname>
          </backendconfiguration>
        </backendconfigurations>
        <mappings current="mssqlMapping">
          <mapping id="mssqlMapping" />
        </mappings>
      </openaccess>
    </configuration>


    Now, the problem is the error messages you see in one of the pictures. What I tried so far is all kinds of changes to the App.config file and I also created a Web.config file for the non-web-project in despair it would only recognize a Web.config file..

    I'd be very grateful for tipps!

    Please be patient with me answering, I'm away until Wednesday.

    Thanks in advance!
    Best
    Deidn

  • Re: ExceptionHandlingBlock error

    09-22-2009, 1:21 PM
    • Member
      11 point Member
    • Deidn
    • Member since 04-17-2009, 4:13 AM
    • Posts 25

    Noone?
    I'd really appreciate some help..
    Do I need to provide some further information?

    Thanks
    Best
    Deidn

  • Re: ExceptionHandlingBlock error

    09-23-2009, 6:52 AM
    Answer
    • Member
      11 point Member
    • Deidn
    • Member since 04-17-2009, 4:13 AM
    • Posts 25

    I solved the problem checking again the references I had to implement. (What actually just brought me to the next prob)

    Best

    Deidn

Page 1 of 1 (3 items)