Home > Net >  Fresh ASP.NET Core MVC projects throwing exceptions
Fresh ASP.NET Core MVC projects throwing exceptions

Time:05-03

So, I made a fresh ASP.NET Core Web App (Model-View-Controller) project in visual studio 2022 and .NET 6 like shown below.
project_type
When I start the project (without changing anything) I get the following 3 exceptions:

Exception thrown: 'System.IO.IOException' in System.Net.Security.dll  
Exception thrown: 'System.IO.IOException' in System.Private.CoreLib.dll  
Exception thrown: 'System.IO.IOException' in System.Private.CoreLib.dll

exceptions

However the project still runs and the website opens as expected.
Are these exceptions something to worry about?

CodePudding user response:

The fact that an exception is thrown is not a problem. Exceptions get thrown. That's what they do. It's a problem when they aren't caught and managed appropriately. If your code isn't even seeing those exceptions then they are being caught and handled in system code, so they're not relevant to you. If your application crashes, that is an unhandled exception, so you need to look at why it's being thrown and whether or not you need to prevent it and/or catch it and clean up.

  • Related