Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

global exception handler c#

//Global.asax
public class MvcApplication : System.Web.HttpApplication
{
    protected void Application_Error(object sender, EventArgs e)
    {
        Exception exception = Server.GetLastError();
        if (exception != null)
        {
            //log the error
        }
    }

    protected void Application_Start()
    {
        //may have some MVC registration stuff here or other code
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to update model in entity framework db first approach 
Csharp :: unity auto scroll 
Csharp :: asp net saber ip address of client machine IIS 
Csharp :: sharepoint c# get list item query by lookup 
Csharp :: C# Blocks with statements 
Csharp :: run dll file 
Csharp :: batchblock timeout 
Csharp :: c# list keyvaluepair update value 
Csharp :: wpf textbox insert text at caret position 
Csharp :: c# group array based on first character 
Csharp :: C# traverseall elements in class property 
Csharp :: Unity Object rotation along any axis 
Csharp :: flat view player movement script 
Csharp :: dynamic add event control c# 
Csharp :: how to check if a file is running in c# 
Csharp :: administration 
Csharp :: referans tipi nedir c# 
Csharp :: how to call an If statement only once in C# 
Csharp :: get current location latitude and longitude in xamarin - NAYCode.com 
Csharp :: how to stream video from vlc in c# 
Csharp :: dapper get list 
Csharp :: c# byte + byte is int 
Csharp :: ##[error]Dotnet command failed with non-zero exit code on the following projects 
Csharp :: run in wpf 
Csharp :: SQLite Parameters 
Csharp :: Get replace normal text from word document in C# 
Csharp :: get list of constants in class c# 
Csharp :: how to add arrays in c# 
Csharp :: delete all fields that start with mongo 
Csharp :: register all services microsoft .net core dependency injection container 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =