How to handle exception outside of page?
I have a C# project and I am trying to convert it to ASP.NET and C#. This is my first ASP.NET project.
I have a C# project and I am trying to convert it to ASP.NET and C#. This is my first ASP.NET project.
I am trying to read a file in my current directory but anytime I run I get a System.IO.FileNotFoundException. with the message could not find file'C:Program Files (x86)IIS Expresscn.config.
I am developing an ASP.NET Core 3.1 API for my React front end app.
How can I log all handled exceptions?
I have made an ISignUp interface which is implemented by the SignUp class to create a new user. I am using Dependancy Injection (DI). The issue is that I cannot register this service. Instead of creating new users in the SignUpController directly, I rather prefer calling a helper class via the Interface it implements.
I recently tried setting up a logging system for my Web API. I decided that I wanted to create custom Exception classes that could be thrown and then logged by my GlobalExceptionHandler. However, I am having some issues accessing the StackTrace of my custom Exception objects.
I have a custom error page set up for my application:
I have very little to go on here. I can’t reproduce this locally, but when users get the error I get an automatic email exception notification:
We are using the excellent ELMAH to deal with unhandled exceptions in an ASP.NET 3.5 web application. This works extremely well for all of the site apart from WCF services which are being consumed using the REST features. When an exception occurs within the operation methods that is not handled by the application code, WCF handles it in various ways depending on the service contracts and configuration settings. This means that the exception does not end up firing the ASP.NET HttpApplication.Error event that ELMAH uses. The two solutions I am aware of to deal with this are:
I’m experiencing this problem today on many different servers.