How to prompt for a password on Windows?

In the previous post, we discovered how to store a password on Windows using the Credential Manager. Today, we'll see the other part of the API with allows the user to enter their password. This API allows asking for a username/password for a console application or a GUI application. Optionally, they can save the password in the Credential Manager, so the next time the passwords are read directly from the… [read more]

How to implement Password reset feature in a web application?

Users are humans, so they have memory problems like everyone. Thus, they happen to forget their password from time to time. The purpose of this article is to show how to give them back access to your application. If it's not clear, the post is about what to do when a user clicks on the submit button on this page: ❌ Resend password by email If you are considering this solution, you are not storing… [read more]

How to store a password in a web application?

A password is a very sensitive piece of information. It allows a user to authenticate on an application. You should not store it like any other data. We often see news indicating that passwords have leaked. This has happened to LinkedIn, Adobe, 500px and unfortunately many more. So you have to make sure that such incidents cannot happen in your applications. Indeed, you are responsible for your data. In… [read more]

CI/CD pipeline for a Visual Studio extension (VSIX) using Azure DevOps

I am the author of the Meziantou.Analyzer, an open-source Roslyn analyzer that ensures the code you write follow some good practices in term of design and performance. This analyzer is published as a Visual Studio extension on the marketplace and as a NuGet package. As I regularly update this project, I want the changes to be published quickly on the marketplace and on NuGet. Of course I don't want to do… [read more]

Stop using IntPtr for dealing with system handles

When using system handles such as file handles, process handles, or any other handles provided by the kernel, you should take care to release them correctly when you don't need them anymore. The native APIs often provides a method to get a handle and a method to release it, plus sometimes a few methods to work with the resource. For instance, you can get a file handle using the method CreateFile, release… [read more]

Creating a FontAwesome bundle with only the icons you use

FontAwesome contains thousands of icons, but you often use a very small subset of those icons. For instance, I only use 15 icons on this website. So, why do you want your visitors to download hundreds of icons they won't use. One solution is to create a custom bundle that contains only the icons you actually use. You can reduce the bundle size from a few hundred kB to a few kB (6kB on this website).… [read more]