Ever want to include a hidden folder and files in your publish output from an ASP.NET project? It's something you might have to do for files you need to place in a folder like .well-known. It's actually pretty easy to include hidden folders in publish, but there's no way to do it in the UI that I'm aware of. Here's how you do it.Continue reading »
Here's a working example of using MongoDB with ASP.NET / C# that demonstrates all the basic operations in MongoDB and encapsulates them in Web API. The example application is a simple Todo list. It's pretty simplistic, but it's more or less the pattern I'm using right now for data access against MongoDB.Continue reading »
There may be times you want to add a watermark, or a bit of text, to an image programmatically. Here's how to do that with ImageSharp. As of the this writing, it requires a couple pre-release NuGet packages, but the ImageSharp libraries seem to work pretty well for at least basic use.
Here's some example code to load an image and draw some watermark text on it.Continue reading »
Apple's MapKit JS isn't currently as widely used as some alternative web mapping solutions, but it's a reasonable option, depending on your needs. While there's no free version, the usage limits are very high, and it's priced more competitively than many rivals, since it's included with an Apple Developer Membership. Integrating MapKit JS with an ASP.NET Core application is a little different at first, if you've never worked with JWT, but it's actually pretty straightforward.Continue reading »
Adding search functionality to a site can be deceptively complex. There's a lot more than just basic string matching that goes into a decent search function -- e.g. fuzziness, stemming, synonyms, etc. Luckily, there are several software services available that provide a lot of functionality out-of-the-box. I'm currently a fan of Elasticsearch for its ease of use and feature-set.
Elasticsearch provides two .NET clients: both a low-level .NET client, Elasticsearch.net, as well as their high-level client, NEST. This post is about using NEST with ASP.NET Core.Continue reading »