quangphan.hashnode.devMocking ASP.NET MVC's ExceptionContext - aka How to mock global exception filter.The Challenge Recently at work, I implemented a global exception filter using ASP.NET MVC (System.Web.Mvc) that implements IExceptionFilter to capture and handle any uncaught exceptions. I'm a big fan of this approach for APIs because it allows excep...Jan 30·3 min read
quangphan.hashnode.devChoosing Between IEnumerable<T> and IReadOnlyCollection<T> in GET endpointsI recently caught myself mindlessly implementing a GET API endpoint that returned an IEnumerable<T>. I've also seen this pattern repeated in many API implementations across different services. While it works, I want to walk through why using IReadOnl...Nov 14, 2025·4 min read
quangphan.hashnode.devCreate Self-Singed Certificate with trusted chain.Most of us have created a single self-signed certificate to test SSL/TLS solutions in our local environment. However, I’d like to focus on creating a self-signed certificate with a trusted chain, as this more closely reflects the type of certificate ...Jun 6, 2025·9 min read
quangphan.hashnode.devSelf-Signed Certificate usage on Local DevelopmentMost of the time, when developing an application on our local machine, we use only HTTP traffic to simplify development and focus on application logic. However, there are important scenarios where enabling encrypted traffic locally becomes necessary....May 28, 2025·7 min read
quangphan.hashnode.devCreating an Authorization Server using OpenIdDict libraryMy team was recently tasked with creating an authorization server that supports OAuth2 and OIDC standards. While this has been done many times before from scratch by various people, the idea of building everything from scratch—such as the database, v...May 14, 2025·6 min read