andieje
asked on
exception handling block with console application
Hi
I am using vb.net 2005 and writing a console application. I thought I would look at using enterprise library 2.0 to handle and log my exceptions. The EHB requires a config file for the application to configure the exception policies and the like but I didn't think console applications had config files. I'm not a programmer by trade so I am probably wrong and way behind the times. I created a new console application and saw that I can add an app.config file. Before I go any further I just wanted to check it is ok to use add and app.config file to a console application and in turn use the EHB.
Many thanjks
I am using vb.net 2005 and writing a console application. I thought I would look at using enterprise library 2.0 to handle and log my exceptions. The EHB requires a config file for the application to configure the exception policies and the like but I didn't think console applications had config files. I'm not a programmer by trade so I am probably wrong and way behind the times. I created a new console application and saw that I can add an app.config file. Before I go any further I just wanted to check it is ok to use add and app.config file to a console application and in turn use the EHB.
Many thanjks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It depends on the size of the application. I have provided many links on that page so you can explore all the options.
ASKER
Hi
I looked at those links and didn't really think any of them were suitable. Many of them were for a global exception handler and I wasn't really looking for that. One of them did email you the errors but included a screen print of the user's screen which I think is illegal so that wasn't any use either. As you can see from this question I have been looking at using the exception handling feature of the enterprise library as this can automatically log your errors to database or email or file or application log. This is more along the lines of what I wanted. I just haven't been able to get the thing to work. Well only just!
I looked at those links and didn't really think any of them were suitable. Many of them were for a global exception handler and I wasn't really looking for that. One of them did email you the errors but included a screen print of the user's screen which I think is illegal so that wasn't any use either. As you can see from this question I have been looking at using the exception handling feature of the enterprise library as this can automatically log your errors to database or email or file or application log. This is more along the lines of what I wanted. I just haven't been able to get the thing to work. Well only just!
>but included a screen print of the user's screen
You can modify the code to suit your needs.
You can modify the code to suit your needs.
ASKER
thanks
ASKER
https://www.experts-exchange.com/questions/24385570/vb-net-2005-error-logging-in-a-console-application.html
any comments are more than welcome
thanks