|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Error handling with web.configI was told that you can add something to web.config so that I can see
any exception that pops out in my web application. In my case, the web app captures almost every exception but displays a useless, generic error for all of them. I don't want to modify any of that code, so I want to add something that wil let me see all the errors (either on screen or an ascii file) without having to modify any exception handling code. I need this because the application generates an error when I use it in the production environment. Is this possible through web.config? If not, is there another way? Thanks. Yes. I just implemented this to my site and it is pretty neat. See:
http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_frm/thread/216b8c51bc368ad6/?hl=en& also: http://www.codeproject.com/aspnet/ASPNETExceptionHandling.asp Now I am chasing an error in a COM object that is NOT being trapped by this technique but this should help you I think. VMI wrote: Show quoteHide quote > I was told that you can add something to web.config so that I can see > any exception that pops out in my web application. In my case, the web > app captures almost every exception but displays a useless, generic > error for all of them. I don't want to modify any of that code, so I > want to add something that wil let me see all the errors (either on > screen or an ascii file) without having to modify any exception > handling code. I need this because the application generates an error > when I use it in the production environment. > Is this possible through web.config? If not, is there another way? > > Thanks. You can't do it just with web.config, but you can do it.
See the sample code at : http://www.codeproject.com/aspnet/ASPNETExceptionHandling.asp Juan T. Llibre, asp.net MVP aspnetfaq.com : http://www.aspnetfaq.com/ asp.net faq : http://asp.net.do/faq/ foros de asp.net, en español : http://asp.net.do/foros/ =================================== Show quoteHide quote "VMI" <mye***@excite.com> wrote in message news:1157642916.719267.235040@d34g2000cwd.googlegroups.com... >I was told that you can add something to web.config so that I can see > any exception that pops out in my web application. In my case, the web > app captures almost every exception but displays a useless, generic > error for all of them. I don't want to modify any of that code, so I > want to add something that wil let me see all the errors (either on > screen or an ascii file) without having to modify any exception > handling code. I need this because the application generates an error > when I use it in the production environment. > Is this possible through web.config? If not, is there another way? > > Thanks. > Thanks for the posts.
I haven't tested it yet because I wanted to make sure that these examples will display any error messages that are already being captured by a try...catch. I can't modify any of the exception-handling code. For example, if I change something in the connectionStirng (i.e. the server name) and the user can't connect to it since it doesn't exist, the application will display the message "Wrong user/password combination". I cannot change that try...catch code so I need something that will display the real message without having to modify anything. THanks. VMI ha escrito: Show quoteHide quote > I was told that you can add something to web.config so that I can see > any exception that pops out in my web application. In my case, the web > app captures almost every exception but displays a useless, generic > error for all of them. I don't want to modify any of that code, so I > want to add something that wil let me see all the errors (either on > screen or an ascii file) without having to modify any exception > handling code. I need this because the application generates an error > when I use it in the production environment. > Is this possible through web.config? If not, is there another way? > > Thanks.
Other interesting topics
How do you pass an ascx user control a variable??? Help please
ad manager question Adding EventHandler to DropDownList programically n00b question re= WebClient class Desperate Need Of Help "Attempted To Read Or Write Protected Memory" classic ASP questions... Access COM object in Code behind(C#) ASP.NET 2.0 Treeview No Postback? VB.Net Tab Control for Web Applications Shopping cart Project |
|||||||||||||||||||||||