Click here to Skip to main content
11,478,619 members (68,333 online)
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads
Add your own
alternative version

MVC Basic Site: Step 2 - Exceptions Management

, 25 Oct 2013 Ms-PL 63K 4.5K 129
This second article from the "MVC Basic Site" series presents in details the exceptions management rules and their implementation for an ASP.NET MVC web site, and provides some utile base classes and source code for Logging and Exceptions Management that can be reused.
MvcBasicSiteDatabase.zip
MvcBasicSiteDatabase.bak
MvcBasicSiteSourceCode.zip
MvcBasicSiteSourceCode
MvcBasicSite
CreateEventLogEntry
Properties
MvcBasic.Logic
ClassDiagram1.cd
MvcBasicSiteModel.edmx
Properties
MvcBasicSite
app_code
App_Data
App_GlobalResources
ClassDiagramUI.cd
Content
Images
dd_arrow.gif
flag_De.png
flag_En.png
flag_Ro.png
HeaderLogo.png
icon-arrow.gif
themes
base
images
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
Controllers
Global.asax
Models
MvcBasicSite.csproj.user
Properties
Scripts
Views
Account
Home
Shared
MvcBasicSiteSourceCodeMVC4.zip
ClassDiagram1.cd
MvcBasicSiteModel.edmx
ClassDiagramUI.cd
dd_arrow.gif
flag_De.png
flag_En.png
flag_Ro.png
HeaderLogo.png
icon-arrow.gif
animated-overlay.gif
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
minified
images
animated-overlay.gif
ui-bg_flat_0_aaaaaa_40x100.png
ui-bg_flat_75_ffffff_40x100.png
ui-bg_glass_55_fbf9ee_1x400.png
ui-bg_glass_65_ffffff_1x400.png
ui-bg_glass_75_dadada_1x400.png
ui-bg_glass_75_e6e6e6_1x400.png
ui-bg_glass_95_fef1ec_1x400.png
ui-bg_highlight-soft_75_cccccc_1x100.png
ui-icons_222222_256x240.png
ui-icons_2e83ff_256x240.png
ui-icons_454545_256x240.png
ui-icons_888888_256x240.png
ui-icons_cd0a0a_256x240.png
Global.asax
MvcBasicSite.csproj.user
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.296
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Resources {
    using System;
    
    
    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option or rebuild the Visual Studio project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Web.Application.StronglyTypedResourceProxyBuilder", "10.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class Resource {
        
        private static global::System.Resources.ResourceManager resourceMan;
        
        private static global::System.Globalization.CultureInfo resourceCulture;
        
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resource() {
        }
        
        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Resources.Resource", global::System.Reflection.Assembly.Load("App_GlobalResources"));
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }
        
        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to About.
        /// </summary>
        internal static string AboutTitle {
            get {
                return ResourceManager.GetString("AboutTitle", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Country.
        /// </summary>
        internal static string AddressCountry {
            get {
                return ResourceManager.GetString("AddressCountry", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Fax.
        /// </summary>
        internal static string AddressFax {
            get {
                return ResourceManager.GetString("AddressFax", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to First name.
        /// </summary>
        internal static string AddressFirstName {
            get {
                return ResourceManager.GetString("AddressFirstName", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Last name.
        /// </summary>
        internal static string AddressLastName {
            get {
                return ResourceManager.GetString("AddressLastName", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Phone.
        /// </summary>
        internal static string AddressPhone {
            get {
                return ResourceManager.GetString("AddressPhone", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Street.
        /// </summary>
        internal static string AddressStreet {
            get {
                return ResourceManager.GetString("AddressStreet", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Town.
        /// </summary>
        internal static string AddressTown {
            get {
                return ResourceManager.GetString("AddressTown", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Zip.
        /// </summary>
        internal static string AddressZipCode {
            get {
                return ResourceManager.GetString("AddressZipCode", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Cancel.
        /// </summary>
        internal static string Cancel {
            get {
                return ResourceManager.GetString("Cancel", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Error in loading data from the Server!.
        /// </summary>
        internal static string ErrorLoadingData {
            get {
                return ResourceManager.GetString("ErrorLoadingData", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Sorry, an error occurred while processing your request..
        /// </summary>
        internal static string ErrorPageMessage {
            get {
                return ResourceManager.GetString("ErrorPageMessage", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Log off.
        /// </summary>
        internal static string HeaderPartialLogoff {
            get {
                return ResourceManager.GetString("HeaderPartialLogoff", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Log on.
        /// </summary>
        internal static string HeaderPartialLogon {
            get {
                return ResourceManager.GetString("HeaderPartialLogon", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Welcome.
        /// </summary>
        internal static string HeaderPartialWelcome {
            get {
                return ResourceManager.GetString("HeaderPartialWelcome", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to MVC Basic Site.
        /// </summary>
        internal static string HeaderTitle {
            get {
                return ResourceManager.GetString("HeaderTitle", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Test Expected Exception.
        /// </summary>
        internal static string IndexTestExpectedException {
            get {
                return ResourceManager.GetString("IndexTestExpectedException", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Test Unhandled Exception.
        /// </summary>
        internal static string IndexTestUnhandledException {
            get {
                return ResourceManager.GetString("IndexTestUnhandledException", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Welcome!.
        /// </summary>
        internal static string IndexTitle {
            get {
                return ResourceManager.GetString("IndexTitle", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to The user name or password provided is incorrect..
        /// </summary>
        internal static string LogOnErrorMessage {
            get {
                return ResourceManager.GetString("LogOnErrorMessage", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Account Information.
        /// </summary>
        internal static string LogOnLegend {
            get {
                return ResourceManager.GetString("LogOnLegend", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Login.
        /// </summary>
        internal static string LogOnLoginButton {
            get {
                return ResourceManager.GetString("LogOnLoginButton", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Please enter your username and password or you can.
        /// </summary>
        internal static string LogOnMessage {
            get {
                return ResourceManager.GetString("LogOnMessage", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to if you don&apos;t have an account..
        /// </summary>
        internal static string LogOnMessage2 {
            get {
                return ResourceManager.GetString("LogOnMessage2", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Password.
        /// </summary>
        internal static string LogOnModelPassword {
            get {
                return ResourceManager.GetString("LogOnModelPassword", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Username.
        /// </summary>
        internal static string LogOnModelUsername {
            get {
                return ResourceManager.GetString("LogOnModelUsername", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to register.
        /// </summary>
        internal static string LogOnRegisterLink {
            get {
                return ResourceManager.GetString("LogOnRegisterLink", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Log On.
        /// </summary>
        internal static string LogOnTitle {
            get {
                return ResourceManager.GetString("LogOnTitle", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Login was unsuccessful. Please correct the errors and try again..
        /// </summary>
        internal static string LogOnValidationSummary {
            get {
                return ResourceManager.GetString("LogOnValidationSummary", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to About.
        /// </summary>
        internal static string MenuAbout {
            get {
                return ResourceManager.GetString("MenuAbout", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Home.
        /// </summary>
        internal static string MenuHome {
            get {
                return ResourceManager.GetString("MenuHome", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to My Account.
        /// </summary>
        internal static string MenuMyAccount {
            get {
                return ResourceManager.GetString("MenuMyAccount", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to My Account.
        /// </summary>
        internal static string MyAccountTitle {
            get {
                return ResourceManager.GetString("MyAccountTitle", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Back.
        /// </summary>
        internal static string RegisterBack {
            get {
                return ResourceManager.GetString("RegisterBack", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to The username is invalid! There is already a registred user for this username..
        /// </summary>
        internal static string RegisterInvalidUsername {
            get {
                return ResourceManager.GetString("RegisterInvalidUsername", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Register.
        /// </summary>
        internal static string RegisterRegister {
            get {
                return ResourceManager.GetString("RegisterRegister", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Thank you for your registration!.
        /// </summary>
        internal static string RegisterThanks {
            get {
                return ResourceManager.GetString("RegisterThanks", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Register.
        /// </summary>
        internal static string RegisterTitle {
            get {
                return ResourceManager.GetString("RegisterTitle", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Comfirm email.
        /// </summary>
        internal static string UserAndAddressComfirmEmail {
            get {
                return ResourceManager.GetString("UserAndAddressComfirmEmail", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Comfirm password.
        /// </summary>
        internal static string UserAndAddressComfirmPassword {
            get {
                return ResourceManager.GetString("UserAndAddressComfirmPassword", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Email.
        /// </summary>
        internal static string UserAndAddressEmail {
            get {
                return ResourceManager.GetString("UserAndAddressEmail", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Password.
        /// </summary>
        internal static string UserAndAddressPassword {
            get {
                return ResourceManager.GetString("UserAndAddressPassword", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Username.
        /// </summary>
        internal static string UserAndAddressUsername {
            get {
                return ResourceManager.GetString("UserAndAddressUsername", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Required.
        /// </summary>
        internal static string ValidationRequired {
            get {
                return ResourceManager.GetString("ValidationRequired", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to MVC Basic .
        /// </summary>
        internal static string WebAppTitle {
            get {
                return ResourceManager.GetString("WebAppTitle", resourceCulture);
            }
        }
    }
}

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 Microsoft Public License (Ms-PL)

Share

About the Author

Raul Iloc
Program Manager SOFTVISION
Romania Romania
I am Project Manager with about 19 years working experience in software development and about 14 years as Project Manager and Architect.
Follow on   LinkedIn

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150520.1 | Last Updated 25 Oct 2013
Article Copyright 2013 by Raul Iloc
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid