245 Posts

In continuing my efforts to process emails in .NET Core, I needed a way to send styled emails with images and such. Previously, I would have manually handled this by replacing text here and there, but using Razor Views seemed like a much better alternative. Considering that the processing would be handled in my domain layer, all of the views would be generated from embedded resources in a class library.

More Link

Earlier, I was dinking around with some base code I wrote for EF 6.x and recently ported over to EF Core. It’s a nice bit of code that can build LINQ expressions for nearly any search/query scenario regardless of the domain models behind the scenes. It utilizes the LINQ Expression libraries and some reflection. The code works fine in EF 6.x, but I ran into a weird issue when building expressions for many-to-many relationships.

More Link

Out of the box, .NET Core has no support for email. The System.Net.Mail namespace hasn’t been ported as of .NET Core 1.1.3. Fortunately, there are some nice email libraries that support .NET Core.

The one library that dug into is called MailKit. It’s available from Nuget.

More Link

I’ve been playing around with Authorize attributes in .NET Core as of late. With a custom (derived) authorization attribute, it seemed like it wasn’t always being evaluated. This caused me to pause and take a step back to examine using the built-in policy-based authorization.

More Link

The other day, I was playing around with providing users the ability to easily copy data. This was needed in order to transfer that data to another application. Since this was for an AngularJS application, a reusable directive seemed like a good idea.

More Link

I’ve previously blogged about dealing with SSL in a .NET Core application. Well, I wanted to expand upon this a bit when debugging in Visual Studio 2017. In the case of working with a development environment, this needs to tie into the launch profiles. Without handling this properly, IISExpress integration is broken which becomes an annoyance.

More Link

Using .NET Core Data Protection is a bit limited. I like how it generates keys and can maintain them, but the storage mechanisms out of the box are fairly limited. Unless you’re using Redis or Azure Stoage, your only option is file system persistence. This isn’t really usable for distributed applications that need to share keys. Ideally, using a SQL server backend would be available, but it’s not too terribly difficult to create one.

More Link

.NET Core doesn’t have built-in support for LDAP (Active Directory). This can be a show-stopper for a lot of projects. It was a bit of a show-stopper for me earlier as well.

So, references to these libraries won’t be available:

System.DirectoryServices
System.DirectoryServices.AccountManagement
System.DirectoryServices.Protcols

But, there are alternatives to mitigate the problem.

More Link