protected void Application_Error() { var ex = Server.GetLastError().GetBaseException(); var auditLog = new AzureWriter(); auditLog.Error(ex); }