CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.microsoft_application_blocks Tags:
Item Type: NewsGroup Date Entered: 11/2/2006 11:19:56 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 39 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
GoranPersson
Asp.Net User
Problem with Exception & Logging application block11/2/2006 11:19:56 AM

0/0

What am I doing wrong? I'd appreciate if someone could take a look at the web.config:

1    <configSections>
2        <section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
3        <section name="exceptionHandling" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Configuration.ExceptionHandlingSettings, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
4        <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
5      </configSections>
6      <loggingConfiguration name="Logging Application Block" tracingEnabled="true"
7        defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
8        <listeners>
9          <add fileName="c:\custtemplog.log" header="----------------------------------------"
10           footer="----------------------------------------" formatter="Text Formatter"
11           listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
12           traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
13           name="FlatFile TraceListener" />
14         <add source="Enterprise Library Logging" formatter="Text Formatter"
15           log="Application" machineName="" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
16           traceOutputOptions="None" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
17           name="Formatted EventLog TraceListener" />
18       </listeners>
19       <formatters>
20         <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}
)}"
21           type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
22           name="Text Formatter" />
23       </formatters>
24       <categorySources>
25         <add switchValue="All" name="Trace">
26           <listeners>
27             <add name="FlatFile TraceListener" />
28           </listeners>
29         </add>
30         <add switchValue="All" name="General">
31           <listeners>
32             <add name="Formatted EventLog TraceListener" />
33           </listeners>
34         </add>
35       </categorySources>
36       <specialSources>
37         <allEvents switchValue="All" name="All Events" />
38         <notProcessed switchValue="All" name="Unprocessed Category" />
39         <errors switchValue="All" name="Logging Errors & Warnings">
40           <listeners>
41             <add name="Formatted EventLog TraceListener" />
42           </listeners>
43         </errors>
44       </specialSources>
45     </loggingConfiguration>
46     <exceptionHandling>
47       <exceptionPolicies>
48         <add name="Global policy">
49           <exceptionTypes>
50             <add type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
51               postHandlingAction="NotifyRethrow" name="Exception">
52               <exceptionHandlers>
53                 <add logCategory="Trace" eventId="100" severity="Error" title="Enterprise Library Exception Handling"
54                   formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
55                   priority="0" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"
56                   name="Logging Handler" />
57               </exceptionHandlers>
58             </add>
59           </exceptionTypes>
60         </add>
61       </exceptionPolicies>
62     </exceptionHandling>

I've included the dll files necessary but when I try

try
{
throw new Exception();
}
catch (Exception ex)
{
ExceptionPolicy.HandleException(ex, "Global policy");
}
Nothing happends. Please help! 
venkatzeus
Asp.Net User
Re: Problem with Exception & Logging application block11/22/2006 5:55:54 AM

0/0

Hi..

  The web.config file looks fine. I would suggest if you could save the web.config file again by following the Enterprise library steps again. Please do have a look at this url, which provides the necessary information.

http://www.codeproject.com/aspnet/ExceptionHandling.asp

Hope this helps in solving your problem.

jbanx
Asp.Net User
Re: Problem with Exception & Logging application block12/4/2006 12:20:53 PM

0/0

I had the same problem and I resolved it by setting proper security rights to the web applicaiton, specifically with ASP.NET permission rights with write access.

 Do contact me incase you require any clarifications

Regards,

Jai 

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
The Definitive Guide to the Microsoft Enterprise Library Authors: Keenan Newton, Pages: 492, Published: 2007
.NET: A Complete Development Cycle Authors: Gunther Lenz, Thomas Moeller, Pages: 553, Published: 2003
Coder to Developer: Tools and Strategies for Delivering Your Software Authors: Mike Gunderloy, Pages: 297, Published: 2004
Beginning Java EE 5 Authors: Kevin Mukhar, Chris Zelenak, James L. Weaver, Jim Crume, Pages: 641, Published: 2005
Pro Scalable .NET 2.0 Application Designs Authors: Joachim Rossberg, Rickard Redler, Pages: 507, Published: 2005
Software Engineering and Fault Tolerant Systems Authors: P. Pelliccione, H. Muccini, N. Guelfi, Pages: 281, Published: 2007
Beginning ASP.NET 2.0 Authors: Chris Hart, John Kauffman, Chris Ullman, David Sussman, Pages: 759, Published: 2005
Macromedia Coldfusion MX Web Application Construction Kit: Web Application Construction Kit Authors: Ben Forta, Nate Weiss, Leon Chalnick, Angela C. Buraglia, Pages: 1500, Published: 2002
Expert ASP.NET 2.0 Advanced Application Design: Advanced Application Design Authors: Dominic Selly, Andrew Troelsen, Tom Barnaby, Pages: 459, Published: 2005

Web:
Microsoft.Net Technology Blog - Vikas Goyal: * Tutorial : Using ... Tutorial : Using Exception Handling Application Block of Enterprise Library. I have just published another tutorial in Enterprise Library series. ...
Exception Handling Application Block in Enterprise Library Exception Logging makes use of another block, called the Logging and Instrumentation Application Block, to send formatted exceptions to the event log , ...
The Exception Handling Application Block The Enterprise Library Exception Handling Application Block helps developers and policy makers to create a consistent strategy for processing exceptions ...
CodeProject: Exception Handling & Logging Application Block ... I have the same problem that I see in this example and that is that a .... I was trying to include Exception Handling & Logging Application Block for ASP. ...
Problem with Exception & Logging application block - ASP.NET Forums Problem with Exception & Logging application block. Last post 12-04-2006 7:20 AM by jbanx. 2 replies. Sort Posts: ...
Exception Handling Application Block This section provides an overview of the Enterprise Library Exception Handling Application Block. An application block is reusable and extensible source ...
CodeProject: Exception Handling Application Block. Free source ... This article introduces concept of Exception Handling Application Block and it's usage; Author: bigb_602; Section: .NET Framework; Chapter: Platforms, ...
Using Enterprise Library 4.0 Exception Handling Application Block Jun 20, 2008 ... I have previously used EL v 3.1 Exception Handling application block ... The problem shows when EL exception handling block ... context, ...
Explore the Enterprise Library Exception Handling Block for .NET 2.0 May 12, 2006 ... The exception handling block makes use of the Logging and Instrumentation application block for this purpose. Exception Policies allow you ...
The Exception Handling Application Block exception handler uses the Logging Application Block discussed in the next chapter. The ...... Show("An unexpected problem has occurred " ...

Videos:
Distributed continuous quality assurance Google London Test Automation Conference (LTAC) Google Tech Talks September 8th, 2006 Presenter: Adam Porter




Search This Site:










get index of row element in table (vb)

same user account for one portal and three child portals - possible?

problem with deployed version of commerce starter kit

direct not found page

spezial web.config

layout issue

problems with portal aliases

constant expression is required.

setting context.user

windows authentication custom error pages not working

dotnetnuke.common.global' is ambiguous

asp.net leaving a tcp connection open? help.

? full background not displaying in form when running app

hourglass cursor

password problem

help finding more information on login control

application blocks in asp.net 2.0

"do-it-yourself" message board tutorial

'msgbox' ambiguous in the namespace ' bunnybear'

flash file should not be stored in the temprory folder

where to find nice xp-style bitmaps/icons?

visual studio templates

how to insert html codes into sql database?

dotnetnuke upgrade error

a window application that is to be schedule to execute every 1 min

noob: looking for a free asp.net 2.0 web host

unable to start debuggin on the web server ... server side-error occured on sending debug http request

configuration manager?

speerio container manager errors

about theme questions.

 
All Times Are GMT