Your technology certification is waiting. Enroll in Cloud Class ®
System.Diagnostics.StackTrace stack = new System.Diagnostics.StackTrace(true);
string executingFile = stack.GetFrame(0).GetFileName();
Open in new window
Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.
Catch ex As Exception
Dim sf As System.Diagnostics.StackFrame = New System.Diagnostics.StackFrame()
Dim mb As System.Reflection.MethodBase = sf.GetMethod()
Session("ErrorMessage") = "Error in " _
& Context.Request.Url.ToString().Replace(Context.Request.Url.GetLeftPart(UriPartial.Authority) & VirtualPathUtility.ToAbsolute("~/"), "~/") _
& "." & mb.Name _
& "<br />" & ex.Message _
& "<br />" & ex.Source
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.