Know Further About ModelState in ASP.NET 5.0

In this post, we’re going to explain what the ModelState is, and what it is used for. We’ll also show how to use it to validate our POSTed inputs, and do simple custom validation. Here we go! What is the ModelState? In short, the ModelState is a collection of name and value pairs that are submitted to the server […]

Read more
Using ASP.NET Core to Find Controllers in Your App

In this post I describe application parts and how ASP.NET Core uses them to find the controllers in your app. I then show how you can retrieve the list at runtime for debugging purposes. Debugging a missing controller A while ago I was converting an ASP.NET application to ASP.NET Core. The solution had many class […]

Read more
Using IHttpClientFactory in ASP.NET Core

In today’s post, we will see how to create named HTTPClient requests using HTTPClientFactory in .NET Core or ASP.NET Core. Create a Named HTTPClient Create an ASP.NET Core Project Let’s look at step by step to understand and create named HTTPClient approach where we shall be creating HTTPClient request object using HTTPClientFactory. Interface IHTTPClientFactory  can be injected in Controller […]

Read more
Why Your ASP.NET Site MUST Run Faster?!

You want your ASP.NET site to load lightning-fast. And if you’re like most of us, when you think of improving your site’s page load times to get that “lightning-fast” designation, you think of your Google PageSpeed Insights score. For many website owners, it’s their white whale. Getting a perfect score on PageSpeed Insights is the impossible […]

Read more
How to Wiring up Ninject with ASP.NET Core 2.0

Ninject is a lightning-fast, ultra-lightweight dependency injector for .NET applications. It helps you split your application into a collection of loosely-coupled, highly-cohesive pieces, and then glue them back together in a flexible manner. By using Ninject to support your software’s architecture, your code will become easier to write, reuse, test, and modify. To test if the […]

Read more
How to Automate Reload Configuration in ASP.NET Core

In this article, I want to explore IOptionsSnapshot and show how to work with IOptionsSnapshot in ASP.NET Core 1.1. We will use the dot-net CLI to create a new project and configure it using the reload technique in combination with IOptionsSnapshot. Make sure you are using at least ASP.NET Core 1.1. Get started by creating […]

Read more