Asp.net Custom Error Page - Server.getlasterror Is Null
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn server.getlasterror not working more about Stack Overflow the company Business Learn more about hiring developers or
Asp.net Application_error
posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community asp.net error handling Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ASP.NET custom error page - Server.GetLastError() is null up vote
Exception Handling In Asp.net C#
95 down vote favorite 31 I have a custom error page set up for my application:
Websites Community Support ASP.NET Community Standup ForumsHelp Web Forms:Guidance Videos Samples Forum Books Open Source Getting Started Getting StartedGetting Started with ASP.NET 4.5 Web Forms and Visual Studio
Asp.net Error Page
20131. Getting Started with Web Forms and Visual Studio2. Create the Project3.
Asp.net Error Logging
Create the Data Access Layer4. UI and Navigation5. Display Data Items and Details6. Shopping Cart7. Checkout and Payment with asp.net mvc error handling PayPal8. Membership and Administration9. URL Routing10. ASP.NET Error HandlingIntroduction to ASP.NET Web FormsCreating a Basic Web Forms Page in Visual Studio 2013Creating ASP.NET Web Projects in Visual Studio 2013Code Editing ASP.NET Web http://stackoverflow.com/questions/343014/asp-net-custom-error-page-server-getlasterror-is-null Forms in Visual Studio 2013ASP.NET Scaffolding in Visual Studio 2013ASP.NET Web Forms (dotnetConf 2014)Using Page Inspector for Visual Studio 2012 in ASP.NET Web FormsVisual Studio 2012 Hands On LabsWhat's New in ASP.NET and Web Development in Visual Studio 2012What's New in Web Forms in ASP.NET 4.5Using Page Inspector in Visual Studio 2012Monitoring and TelemetryRoutingASP.NET 4 - RoutingASP.NET 4 - Defining RoutesASP.NET 4 - http://www.asp.net/web-forms/overview/getting-started/getting-started-with-aspnet-45-web-forms/aspnet-error-handling Constructing URLs from RoutesASP.NET 4 - Accessing URL Parameters in a PageJavaScript and Client FrameworksASP.NET 4 - Microsoft Ajax OverviewASP.NET AJAX Control Toolkit (maintained by DevExpress)Working with Data Getting Started with ASP.NET 4.5 Web FormsModel Binding and Web Forms in Visual Studio 20131. Retrieving and Displaying Data2. Updating, Deleting, and Creating Data3. Sorting, Paging, and Filtering Data4. Integrating JQuery UI Datepicker5. Using Query String Values to Filter Data6. Adding Business Logic LayerASP.NET 4 Web Forms - Validating User Input in a PageASP.NET 4 Web Forms - State ManagementASP.NET Data Access - Recommended ResourcesServer Data ControlsASP.NET 4 Data-Bound ControlsASP.NET 4 Data Source Controls OverviewASP.NET 4.5 Chart ControlRecommended Resources for ASP.NET Data AccessSecurity, Authentication, and Authorization Getting Started with ASP.NET 4.5 Web FormsASP.NET IdentityCreate a secure ASP.NET Web Forms app with user registration, email confirmation and password reset (C#)Create an ASP.NET Web Forms app with SMS Two-Factor Authentication (C#)OWIN and KatanaPerformanceUsing Asynchronous Methods in ASP.NET 4.5[Build 2014] Deep Dive: Improving Performance in Your ASP.NET App (Levi Broderick)ASP.NET 4 - Web Forms Performance OverviewASP.NET 4 - Web Forms Caching OverviewASP.NET 4 - Caching Web Forms PagesASP.NET 4 - Caching Port
ASP.NET Community Standup Forums Help Home/ASP.NET Forums/General ASP.NET/Getting Started/error on Server.GetLastError() error on Server.GetLastError() [Answered]RSS 31 replies Last post Jun 12, 2009 08:30 AM by eric2820 ‹ Previous Thread|Next Thread › Print Share Twitter http://forums.asp.net/t/1432997.aspx?error+on+Server+GetLastError+ Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Support Options Advanced Search Reply kirank28 Member 362 Points 565 Posts error on Server.GetLastError() Jun 09, 2009 02:07 AM|kirank28|LINK i have added this code on my https://bytes.com/topic/asp-net/answers/707617-custom-error-page-does-not-work-server-getlasterror-null web.config page web.config
Question Need help? Post your question and get tips & solutions from a community of 418,430 IT Pros & Developers. It's quick & easy. Custom error page does not work (Server.GetLastError() is null) P: n/a Seguros Catatumbo Hello guys, i am trying to port my custom asp 3.0 error page to asp.net. I want to disable debugging in my asp.net projects but i want to show the users a pretty page but that page should send me an email with the details of the error. On classic asp i just went to iis and mapped the 500 error code to error.asp, which does this: set objError = Server.getLastError() numero = objError.AspCode tipo = objError.Category pagina = objError.File descripcion = objError.Description fuente = Server.HTMLEncode(objError.Source) linea = ObjError.Line iis = ObjError.ASPDescription and i send all that info via email. It is my understanding that i dont have to mess with IIS on asp.net. I just set customErrors on web.config properly, and indeed i get the pretty error page, but when i do this: Exception ex = Server.GetLastError(); It always returns null. How can i make this work? Also, on asp.net i dont seem to have the same info i get on classic asp (code, category, file, descripcion, source, line...), how can i get the same data? Sep 13 '07 #1 Post Reply Share this Question 2 Replies P: n/a Seguros Catatumbo Exception ex = Server.GetLastError(); It always returns null. How can i make this work? Ok, after a lot of searching, somehow it seems that i needed to add a global.asax page and handle the error here: void Application_Error(object sender, EventArgs e) { // Code that runs when an unhandled error occurs Exception ex = Server.GetLastError(); Server.Transfer("error500.aspx"); } > Also, on asp.net i dont seem to have the same info i get on classic asp (code, category, file, descripcion, source, line...), how can i get the same data? I still can't seem to emulate the rest of the fields that i have available on classic asp. Seems that asp.net dumps everything on the exception itself. Sep 13 '07 #2 P: n/a =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?= Use Exception ex = Server.GetLastError().GetBaseException(); THAT is the exception. http://support.microsoft.com/kb/306355 -- Peter Recursion: see Recursion site: http://www.eggheadcafe.com unBlog: http://petesbloggerama.blogspot.com BlogMetaFinder: http://www.blogmetafinder.com "Seguros Catatumbo" wrote: Hello guys, i am trying to port my custom asp 3.0 error page to asp.net. I want to disable debugging in my asp.net projects but i want to show the users a pretty page but that page should send me an email with the detai