What is NullReferenceException? Object reference not set to an instance of an object

Matt Watson Developer Tips, Tricks & Resources, Live Queue Leave a Comment

Null reference errors are responsible for a good percentage of all application bugs. They are usually very simple problems caused by not adding additional logic to ensure that objects have valid values before using them. The following code will throw a NullReferenceException if the variable “text” being passed in is null. You can’t call ToUpper() on a null string. public …

Understanding # of Exceps Thrown / Sec, and How to Find Exceptions

Matt Watson Developer Tips, Tricks & Resources, Live Queue Leave a Comment

Exceptions can cause big performance problems. One of the most important performance metrics to track about your application is “# of Exceps Thrown / Sec“. It is available via Windows Performance Counters under the category .NET CLR Exceptions. In this article we will talk about exceptions, how to monitor your exception rate and find the actual exceptions being thrown. Is …

What is an Unhandled Exception, and How to Catch All C# Exceptions

Matt Watson Developer Tips, Tricks & Resources, Live Queue Leave a Comment

What is an Unhandled Exception? An exception is a known type of error. An unhandled exception occurs when the application code does not properly handle exceptions. For example, When you try to open a file on disk, it is a common problem for the file to not exist. The .NET Framework will then throw a FileNotFoundException. This is a simple example …

C# Exception Handling Best Practices

Matt Watson Developer Tips, Tricks & Resources, Live Queue Leave a Comment

Welcome to Stackify’s guide to C# exception handling. In this article we cover the following topics: Basics about C# Exceptions, including examples Common .NET Exceptions How to Create Your Own Custom C# Exception Types How to Find Hidden .NET Exceptions C# Exception Logging Best Practices What is an Exception? Exceptions are a type of error that occurs during the execution …

.NET Core Logger Factory

How to Use LoggerFactory and Microsoft.Extensions.Logging for .NET Core Logging With C#

Matt Watson Developer Tips, Tricks & Resources, Live Queue Leave a Comment

If you have used .NET Core, you have probably battled with the new built-in .NET Core LoggerFactory which is in Microsoft.Extensions.Logging. It has created a lot of confusion around logging with ASP.NET Core. At Stackify, we have logging integrations for log4net, NLog, Serilog, and our direct API. We have a lot of experience with building logging appenders and libraries to work with various …

ASP .NET Core Logging

ASP.NET Core Logging Tutorial – What Still Works and What Changed?

Matt Watson Developer Tips, Tricks & Resources Leave a Comment

If you are getting started with ASP.NET Core, you are probably wondering what has changed with logging. In short, the answer is both nothing and everything. The common logging libraries you have always used with .NET still work. Microsoft does provide its own interface for logging with .NET Core and it uses it for .NET internals. In this article, we …

NLog Best Practices, Resources & Tips

Ultimate NLog Tutorial for .NET Logging – 19 Best Practices, Resources and Tips

Matt Watson Developer Tips, Tricks & Resources, Live Queue Leave a Comment

NLog is a very popular logging framework for .NET. It is second only to log4net in popularity but is much newer and has a few unique features. I recently also wrote a similar tutorial for log4net and after looking at them side by side, NLog has a lot of great features and advantages.   1. What is NLog? Why Should …

Stackify Offers the Best in ASP.NET Application Monitoring

Courtney Stackify Product & Company Updates Leave a Comment

If you are seeking a cost-effective, comprehensive tool for ASP.NET application monitoring, look no further than Stackify’s Application Performance Monitoring tool, APM+. Stackify’s ASP.NET monitoring solution enables developers to drill down into an application at the code level in order to gain insights about the application’s behavior and performance to quickly catch and resolve application problems. What is offered within …

Application Support Tools from Stackify

Courtney Stackify Product & Company Updates Leave a Comment

Developers, DevOps, and CTOs/CIOs are turning to Stackify for its incredibly useful set of application support tools. Including Application Performance Monitoring (APM+), error tracking, log management, and server monitoring. A key component of Stackify’s application support tools, APM+, offers an enormous amount of code-level insights making it easy to find slow web requests and quickly pinpoint at the code level …