Click here to Skip to main content
11,639,861 members (60,184 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » Howto » Downloads
Add your own
alternative version

Exception Handling & Logging Application Block: Enterprise Library 1.0

, 1 May 2005 CPOL 249K 2.3K 77
This article illustrates how to log your Exception into trace.log file using Enterprise Library of .NET Framework.
ExceptionConfigurationblock_src.zip
ExceptionConfiguration block
bin
ExceptionConfiguration block.dll
Microsoft.Practices.EnterpriseLibrary.Common.dll
Microsoft.Practices.EnterpriseLibrary.Configuration.dll
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll
Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll
Microsoft.Practices.EnterpriseLibrary.Logging.dll
ExceptionConfiguration block.csproj.webinfo
Global.asax
trace.log
_vti_cnf
_vti_pvt
access.cnf
deptodoc.btr
doctodep.btr
service.cnf
service.lck
services.cnf
_vti_script
_vti_txt
<VisualStudioProject>
    <CSHARP
        ProjectType = "Web"
        ProductVersion = "7.10.3077"
        SchemaVersion = "2.0"
        ProjectGuid = "{669A060D-339E-4DD0-ADA6-516964952F69}"
    >
        <Build>
            <Settings
                ApplicationIcon = ""
                AssemblyKeyContainerName = ""
                AssemblyName = "ExceptionConfiguration block"
                AssemblyOriginatorKeyFile = ""
                DefaultClientScript = "JScript"
                DefaultHTMLPageLayout = "Grid"
                DefaultTargetSchema = "IE50"
                DelaySign = "false"
                OutputType = "Library"
                PreBuildEvent = ""
                PostBuildEvent = ""
                RootNamespace = "ExceptionConfiguration_block"
                RunPostBuildEvent = "OnBuildSuccess"
                StartupObject = ""
            >
                <Config
                    Name = "Debug"
                    AllowUnsafeBlocks = "false"
                    BaseAddress = "285212672"
                    CheckForOverflowUnderflow = "false"
                    ConfigurationOverrideFile = ""
                    DefineConstants = "DEBUG;TRACE"
                    DocumentationFile = ""
                    DebugSymbols = "true"
                    FileAlignment = "4096"
                    IncrementalBuild = "false"
                    NoStdLib = "false"
                    NoWarn = ""
                    Optimize = "false"
                    OutputPath = "bin\"
                    RegisterForComInterop = "false"
                    RemoveIntegerChecks = "false"
                    TreatWarningsAsErrors = "false"
                    WarningLevel = "4"
                />
                <Config
                    Name = "Release"
                    AllowUnsafeBlocks = "false"
                    BaseAddress = "285212672"
                    CheckForOverflowUnderflow = "false"
                    ConfigurationOverrideFile = ""
                    DefineConstants = "TRACE"
                    DocumentationFile = ""
                    DebugSymbols = "false"
                    FileAlignment = "4096"
                    IncrementalBuild = "false"
                    NoStdLib = "false"
                    NoWarn = ""
                    Optimize = "true"
                    OutputPath = "bin\"
                    RegisterForComInterop = "false"
                    RemoveIntegerChecks = "false"
                    TreatWarningsAsErrors = "false"
                    WarningLevel = "4"
                />
            </Settings>
            <References>
                <Reference
                    Name = "System"
                    AssemblyName = "System"
                    HintPath = "..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll"
                />
                <Reference
                    Name = "System.Drawing"
                    AssemblyName = "System.Drawing"
                    HintPath = "..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
                />
                <Reference
                    Name = "System.Data"
                    AssemblyName = "System.Data"
                    HintPath = "..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
                />
                <Reference
                    Name = "System.Web"
                    AssemblyName = "System.Web"
                    HintPath = "..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Web.dll"
                />
                <Reference
                    Name = "System.XML"
                    AssemblyName = "System.Xml"
                    HintPath = "..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
                />
                <Reference
                    Name = "Microsoft.Practices.EnterpriseLibrary.ExceptionHandling"
                    AssemblyName = "Microsoft.Practices.EnterpriseLibrary.ExceptionHandling"
                    HintPath = "..\..\..\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll"
                />
                <Reference
                    Name = "Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging"
                    AssemblyName = "Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging"
                    HintPath = "..\..\..\Program Files\Microsoft Enterprise Library\bin\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll"
                />
            </References>
        </Build>
        <Files>
            <Include>
                <File
                    RelPath = "AssemblyInfo.cs"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "ExceptionApplicationBlock.aspx"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "ExceptionApplicationBlock.aspx.cs"
                    DependentUpon = "ExceptionApplicationBlock.aspx"
                    SubType = "ASPXCodeBehind"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "ExceptionApplicationBlock.aspx.resx"
                    DependentUpon = "ExceptionApplicationBlock.aspx.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "Global.asax"
                    SubType = "Component"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "Global.asax.cs"
                    DependentUpon = "Global.asax"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "Global.asax.resx"
                    DependentUpon = "Global.asax.cs"
                    BuildAction = "EmbeddedResource"
                />
                <File
                    RelPath = "Web.config"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "bin\ExceptionConfiguration block.dll"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "bin\ExceptionConfiguration block.pdb"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "bin\Microsoft.Practices.EnterpriseLibrary.Common.dll"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "bin\Microsoft.Practices.EnterpriseLibrary.Configuration.dll"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "bin\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.dll"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "bin\Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.dll"
                    BuildAction = "Content"
                />
                <File
                    RelPath = "bin\Microsoft.Practices.EnterpriseLibrary.Logging.dll"
                    BuildAction = "Content"
                />
            </Include>
        </Files>
    </CSHARP>
</VisualStudioProject>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

santosh poojari
Technical Lead
India India
Whatsup-->Exploring--> MVC/HTML5/Javascript & Virtualization.......!
www.santoshpoojari.blogspot.com

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150731.1 | Last Updated 2 May 2005
Article Copyright 2005 by santosh poojari
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid