Posts

ASP.NET Core 10: Securing a .NET 10 Minimal API with ASP.NET Core Identity Built-in Endpoints, EF Core & Swagger

In this article, we will explore ASP.NET Core 10 Security for Minimal APIs with Built-In Security Enhancements  Why ASP.NET Core Identity's Built-in API Endpoints? Starting with .NET 8, ASP.NET Core Identity ships a set of ready-made Minimal API endpoints for authentication. Instead of hand-rolling /register , /login , /refresh-token , and email-confirmation logic, you can call three simple extension methods: AddIdentityApiEndpoints<TUser>() — This registers Identity's services configured for API scenarios (no cookies/redirects, JSON responses). .AddEntityFrameworkStores<TDbContext>() — This tells Identity to persist users, roles, and tokens using Entity Framework Core. app.MapIdentityApi<TUser>() — This maps the actual HTTP routes (register, login, refresh, confirmEmail, resendConfirmationEmail, forgotPassword, resetPassword, manage/info, manage/2fa) onto your route group. Combined with Bearer tokens  instead of cookies, this offfer...

ASP.NET Core 10 AI features: Building an Azure OpenAI Image Generator with gpt-image-1.5

Image
ASP.NET Core 10 continues the modern web development story for .NET developers by combining minimal hosting, dependency injection, Razor Pages, configuration, HTTP clients, validation, and static web assets in a clean application model. In this project, these ASP.NET Core 10 features are used to build an AI image generator named aspnet10aiimg . The application accepts a prompt, verifies the quality and safety of that prompt, sends it to Azure OpenAI, and displays the generated image in the browser. The AI model used in this project is gpt-image-1.5 , an Azure OpenAI image generation model. It accepts text prompts and returns generated image data. In the app, the server calls the Azure OpenAI image generations REST endpoint using the deployment name configured for your Azure OpenAI resource. The API version used is 2025-04-01-preview , and the project expects image output as base64 PNG data, which is converted into a browser-ready data URI. Project implementation diagram...

ASP.NET Core Blazor Server Application: Creating Prompt Based Chart Generator for Northwind Database

Image
In this article we will implement a NorthwindReporter,  an ASP.NET Core 10 Blazor Server application that lets an end user type a natural-language reporting request (for example, “Regionwise sales” or “Top 5 products by revenue” ), pick a chart type, and get back: A Chart.js visualization rendered in the browser canvas. The raw rows of the result in an HTML data table . The actual SQL the LLM produced, so it is transparent. The reporting engine uses a local Ollama install with the llama3.2 model to translate the English prompt into a single read-only SELECT , a safety validator to make sure that is all it is, and a repository that runs it against a SQL Server “Northwind” database. Workflow Diagram The picture below summarizes how a request flows through the components. Four numbered arrows mark the main hops of one Generate click — each is explained right after the picture. The four numbered steps in the diagram ...