Line 1: #ExternalChecksum("D:\Websites\Gretchen\www.omaharotary.com\global.asax","{406ea660-64cf-4c82-b6f0-42d48172a799}","2C90A773267F7FF11CF367F5D45B06B7")
Line 2: '------------------------------------------------------------------------------
Line 3: ' <auto-generated>
Line 4: ' This code was generated by a tool.
Line 5: ' Runtime Version:2.0.50727.8964
Line 6: '
Line 7: ' Changes to this file may cause incorrect behavior and will be lost if
Line 8: ' the code is regenerated.
Line 9: ' </auto-generated>
Line 10: '------------------------------------------------------------------------------
Line 11:
Line 12: Option Strict Off
Line 13: Option Explicit Off
Line 14:
Line 15: Imports Microsoft.VisualBasic
Line 16: Imports sendGmail
Line 17: Imports System
Line 18: Imports System.Collections
Line 19: Imports System.Collections.Specialized
Line 20: Imports System.Configuration
Line 21: Imports system.net.mail
Line 22: Imports System.Text
Line 23: Imports System.Text.RegularExpressions
Line 24: Imports System.Web
Line 25: Imports System.Web.Caching
Line 26: Imports System.Web.Profile
Line 27: Imports System.Web.Security
Line 28: Imports System.Web.SessionState
Line 29: Imports System.Web.UI
Line 30: Imports System.Web.UI.HtmlControls
Line 31: Imports System.Web.UI.WebControls
Line 32: Imports System.Web.UI.WebControls.WebParts
Line 33:
Line 34: Namespace ASP
Line 35:
Line 36: <System.Runtime.CompilerServices.CompilerGlobalScopeAttribute()> _
Line 37: Public Class global_asax
Line 38: Inherits Global.System.Web.HttpApplication
Line 39:
Line 40: Private Shared __initialized As Boolean
Line 41:
Line 42:
Line 43: #ExternalSource("D:\Websites\Gretchen\www.omaharotary.com\global.asax",5)
Line 44:
Line 45:
Line 46: Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
Line 47: ' Code that runs on application startup
Line 48: End Sub
Line 49:
Line 50: Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
Line 51: ' Code that runs on application shutdown
Line 52: End Sub
Line 53:
Line 54: Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
Line 55: ' Code that runs when an unhandled error occurs
Line 56: ' Get the error details
Line 57: Dim lastErrorWrapper As HttpException = CType(Server.GetLastError(), HttpException)
Line 58:
Line 59: Dim lastError As Exception = lastErrorWrapper
Line 60: If lastErrorWrapper.InnerException IsNot Nothing Then
Line 61: lastError = lastErrorWrapper.InnerException
Line 62: End If
Line 63:
Line 64: Dim lastErrorTypeName As String = lastError.GetType().ToString()
Line 65: Dim lastErrorMessage As String = lastError.Message
Line 66: Dim lastErrorStackTrace As String = lastError.StackTrace
Line 67:
Line 68: Const Subject As String = "An Error Has Occurred on Rotary Web site"
Line 69:
Line 70: ' Create the MailMessage object
Line 71: Dim mmBody As String = String.Format( _
Line 72: "<html>" & vbCrLf & _
Line 73: " <body>" & vbCrLf & _
Line 74: " <h1>An Error Has Occurred!</h1>" & vbCrLf & _
Line 75: " <table cellpadding=""5"" cellspacing=""0"" border=""1"">" & vbCrLf & _
Line 76: " <tr>" & vbCrLf & _
Line 77: " <tdtext-align: right;font-weight: bold"">URL:</td>" & vbCrLf & _
Line 78: " <td>{0}</td>" & vbCrLf & _
Line 79: " </tr>" & vbCrLf & _
Line 80: " <tr>" & vbCrLf & _
Line 81: " <tdtext-align: right;font-weight: bold"">User:</td>" & vbCrLf & _
Line 82: " <td>{1}</td>" & vbCrLf & _
Line 83: " </tr>" & vbCrLf & _
Line 84: " <tr>" & vbCrLf & _
Line 85: " <tdtext-align: right;font-weight: bold"">Exception Type:</td>" & vbCrLf & _
Line 86: " <td>{2}</td>" & vbCrLf & _
Line 87: " </tr>" & vbCrLf & _
Line 88: " <tr>" & vbCrLf & _
Line 89: " <tdtext-align: right;font-weight: bold"">Message:</td>" & vbCrLf & _
Line 90: " <td>{3}</td>" & vbCrLf & _
Line 91: " </tr>" & vbCrLf & _
Line 92: " <tr>" & vbCrLf & _
Line 93: " <tdtext-align: right;font-weight: bold"">URL Referrer [beta]:</td>" & vbCrLf & _
Line 94: " <td>{4}</td>" & vbCrLf & _
Line 95: " </tr>" & vbCrLf & _
Line 96: " <tr>" & vbCrLf & _
Line 97: " <tdtext-align: right;font-weight: bold"">Stack Trace:</td>" & vbCrLf & _
Line 98: " <td>{5}</td>" & vbCrLf & _
Line 99: " </tr> " & vbCrLf & _
Line 100: " </table>" & vbCrLf & _
Line 101: " </body>" & vbCrLf & _
Line 102: "</html>", _
Line 103: Request.RawUrl, _
Line 104: User.Identity.Name, _
Line 105: lastErrorTypeName, _
Line 106: lastErrorMessage, _
Line 107: "" & Request.UrlReferrer.ToString(), _
Line 108: lastErrorStackTrace.Replace(Environment.NewLine, "<br />"))
Line 109:
Line 110: 'Attach the Yellow Screen of Death for this error
Line 111: Dim YSODmarkup As String = lastErrorWrapper.GetHtmlErrorMessage()
Line 112: 'If Not String.IsNullOrEmpty(YSODmarkup) Then
Line 113: ' Dim YSOD As Attachment = Attachment.CreateAttachmentFromString(YSODmarkup, "YSOD.htm")
Line 114: ' mm.Attachments.Add(YSOD)
Line 115: 'End If
Line 116:
Line 117:
Line 118: ' Send the email
Line 119: 'Dim smtp As New SmtpClient()
Line 120: 'smtp.Send(mm)
Line 121: sendGmailMessage("no-reply@omaharotary.org", "no-reply@omaharotary.org", Subject, mmBody, , YSODmarkup)
Line 122: ' Clear the error from the server
Line 123: Server.ClearError()
Line 124: End Sub
Line 125:
Line 126: Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
Line 127: ' Code that runs when a new session is started
Line 128: End Sub
Line 129:
Line 130: Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
Line 131: ' Code that runs when a session ends.
Line 132: ' Note: The Session_End event is raised only when the sessionstate mode
Line 133: ' is set to InProc in the Web.config file. If session mode is set to StateServer
Line 134: ' or SQLServer, the event is not raised.
Line 135: End Sub
Line 136:
Line 137: Protected Sub Application_BeginRequest(sender As Object, e As EventArgs)
Line 138: If (Request.Url.LocalPath.ToLower().StartsWith("/membersonly")) Then
Line 139: Response.Redirect("/myrotary/default.aspx", True)
Line 140: End If
Line 141: If (Request.Url.LocalPath.ToLower().StartsWith("/Calendar/~")) Then
Line 142: Response.Redirect("/calendar/calendarView.aspx", True)
Line 143: End If
Line 144: If (Request.Url.LocalPath.ToLower().StartsWith("/404.aspx")) Then
Line 145: Response.Redirect("/app_ErrorPages/404.aspx", True)
Line 146: End If
Line 147:
Line 148: End Sub
Line 149:
Line 150: #End ExternalSource
Line 151:
Line 152:
Line 153: <System.Diagnostics.DebuggerNonUserCodeAttribute()> _
Line 154: Public Sub New()
Line 155: MyBase.New
Line 156: If (Global.ASP.global_asax.__initialized = false) Then
Line 157: Global.ASP.global_asax.__initialized = true
Line 158: End If
Line 159: End Sub
Line 160:
Line 161: Protected ReadOnly Property Profile() As ProfileCommon
Line 162: Get
Line 163: Return CType(Me.Context.Profile,ProfileCommon)
Line 164: End Get
Line 165: End Property
Line 166: End Class
Line 167: End Namespace
Line 168:
|