InternetException

ASP.NET MVC

ASP.NET MVC · 3 posts (all tags)

ASP.NET Core controller level exception handling

· 43 words · ~1 min read · updated · in .NET, interview

#ASP.NET MVC #ASP.NET

To handle exceptions on Controller/Action level Exception Filters are used. [TypeFilter(typeof(SampleExceptionFilter))] public class ExceptionController : Controller Exception Filters are implemented using IExceptionFilter with OnExcetion method override to handle exceptions. Exception Filters can be applied to Controller and Action level. Further read: https://learn.microsoft.com/en-us/aspnet/core/mvc/controllers/filters?view=aspnetcore-7.0#exception-filters https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.filters.iexceptionfilter?view=aspnetcore-7.0

What ASP.NET Middleware can do?

· 42 words · ~1 min read · updated · in .NET, interview

#ASP.NET MVC #ASP.NET

Pretty much everything. Default ASP.NET Core request handling pipeline is consisting of bunch of middlewares: Authentication Authorization CORS HTTP Logging MVC Static Files other Whole list of built-in middlewares can be found here: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/middleware/?view=aspnetcore-7.0#built-in-middleware There is possibility to write custom middleware too.

WebSocket libraries comparison

· 1786 words · ~8 min read · updated · in .NET

#WebSocket #async #ASP.NET MVC #NuGet

Web project often requires to push data to clients as fast as possible, whenever it is necessary without waiting for client request. It is perfect for website with real time communication between users, like with online communicators for example. Or document collaboration tools. Or maybe system status updates on long running calculation/tasks performed by server. In every case two way communication mechanism is ideal.

Read the whole thing →