microsoftnet
By Joydip Kanjilal Minimal APIs in ASP.NET Core allow us to build lightweight APIs with minimal dependencies. However, often we will still need authentication and authorization in our minimal APIs. There are several ways to achieve this in ASP.NET Core including basic authentication, token-based authentication, and identity-based authentication. We discussed implementing basic authentication in minimal APIs here, and JWT token-based authentication in minimal APIs here. In this article we’ll examine how we can implement identity-based authentication for minimal APIs in ASP.NET Core. To use the ...
Info World
By Paul Krill Microsoft’s .NET Aspire, an opinionated, cloud-ready stack for building distributed applications, is now generally available. The .NET Aspire stack was announced on May 21. Intended to simplify cloud-native development, the Aspire stack unites tools, templates, and NuGet packages to build observable, production-ready applications in .NET more easily, the company said. Developers can get started with .NET Aspire now in Visual Studio 2022 17.10, the .NET CLI, or the Visual Studio Code editor. The stack had been in preview since last November. .NET Aspire is part of an ongoing goal ...
Info World
By Paul Krill C# 13, a planned update to Microsoft’s popular general purpose language for .NET development, is set to enhance params parameters to give developers more flexibility, and to introduce extension types, a new kind of type that provides extension members for an underlying type. Microsoft detailed the plans for C# 13 on May 21. Beginning with C# 13, the params parameter type can be any of the types used with collection expressions such as Span<T>, List<T>, and IEnumerable<T>. Developers also can use their own collections if they follow special rules. Also, many methods of the .NET Ru...
Info World
By Joydip Kanjilal When developing database-driven .NET and .NET Core, regardless of the database we intend to deploy in the end, we will often want to work with a database engine that is lightweight and fast, in order to execute tests quickly and speed up development. Here SQLite is an ideal choice. You can use SQLite to gain both faster data access and a smaller footprint. The SQLite database is usually stored as a single disk file, although it can also work as an in-memory database. However, unlike an in-memory database, SQLite allows you to query data without having to load the entire data...
Info World
By Joydip Kanjilal ASP.NET Core offers a simplified hosting model, called minimal APIs, that allows us to build lightweight APIs with minimal dependencies. However, “minimal” doesn’t mean minimal security. Minimal APIs need authentication too. We’ve explored JWT authentication in an earlier post here. In this article we’ll examine how we can build a basic authentication handler for minimal APIs in ASP.NET Core. Below we’ll implement a basic authentication handler that will identify and authenticate the user. Because we will validate the user’s identity using credentials stored in a database, w...
Info World
By Paul Krill Userware has released OpenSilver 2.2, an update to the company’s open-source replacement for Microsoft’s Silverlight rich internet application framework. This release lets legacy Visual Studio LightSwitch applications run on modern browsers via a compatibility pack. OpenSilver 2.2 and the LightSwitch Compatibility Pack were announced April 30. Developers can download OpenSilver 2.2 and sign up for a trial of LightSwitch Compatibility Pack. With the Userware updates, Lightswitch applications can be ported without rewriting them. Discontinuation of the Silverlight plugin, which pow...
Info World
By Paul Krill Microsoft has introduced version 8 of the .NET MAUI (Multi-platform App UI) Community Toolkit, featuring TouchBehavior, for interacting with visual elements in an application based on touch, mouse clicks, and hover events. The update was introduced April 24. Instructions for getting started with the toolkit are available on GitHub. With the new release, the TouchBehavior implementation enables customization of different visual properties on the VisualElement it is attached to, such as the background color, opacity, scale, and rotation. TouchBehavior also makes it possible to impl...
Info World
By Joydip Kanjilal ASP.NET Core offers a simplified hosting model, called minimal APIs, that allows us to build lightweight APIs with minimal dependencies. Ideal for building fast and simple services, minimal APIs were initially introduced in ASP.NET Core 6 to strip away the complexity of traditional APIs and make it easier to build microservices. The goal of this post is to explore the new features for building minimal APIs introduced in ASP.NET Core 8. To use the code examples provided in this article, you should have Visual Studio 2022 installed in your system. If you don’t already have a c...
Info World
By Joydip Kanjilal A high-quality application must be stable, performant, scalable, and reliable. The reliability of an application depends on many factors, but one of the most important is resiliency, or the ability to withstand failures or faults during run time. In this article, we’ll see how we can bring resiliency to database connections in ASP.NET Core using Entity Framework Core. EF Core has a feature called connection resiliency that automatically retries failed database commands to maintain connectivity during transient errors or network instability. By encapsulating the logic for ide...
Info World
By Paul Krill Microsoft has announced the MSTest SDK. Built on the MSBuild Project SDK system and based on the MSTest runner, the MSTest SDK is designed to give developers a better experience for testing with MSTest, Microsoft’s framework for unit testing. The MSTest SDK, announced April 11, makes project configuration easier via sensible defaults and flexible options, Microsoft said. To use the MSTest SDK, developers must create an MSTest project, or update an existing MSTest project, and replace the content of the .csproj file. Advantages of the new MSTest SDK include better defaults, easier...
Info World
閲覧を続けるには、ノアドット株式会社が「プライバシーポリシー」に定める「アクセスデータ」を取得することを含む「nor.利用規約」に同意する必要があります。
「これは何?」という方はこちら