Category "asp.net-core"

Why does validation in ASP.NET Core Razor Pages doesn't accept empty inputs?

I am learning how to code in ASP.NET Core Razor Pages and am working on validation right now. Both in client side and server side validation no input is allowed

How to test MassTransit saga state machine with certain state?

I have state machine build with MassTransit: public class OrderStateMachine : MassTransitStateMachine<Order> { public State Completed { get; init; }

ASP.NET Core 6 MVC app custom ExceptionFilter does not catch all exceptions

I have web app with custom exception filter. public class CustomExceptionFilter : ExceptionFilterAttribute { public override void OnException(ExceptionConte

Is there a possibility to set RefreshTokenUsage in oidc client?

i have a problem with my token. when we start our program, the cache should be checked for a valid token. This works for the first time, but afterwards refreshT

SignalR no longer works since upgrading to .NET Core 3.1

I have a websocket server application that I recently upgraded from .NET Core 2.1 to 3.1, however, since then the negotiation seems to fail. This is the error t

System.Timer in .net core not tracking time correctly

I have this piece of code: public void StartTimer(string roomName) { var roomTimer = GetRoomTimer(roomName); var room = GetRoom(roomName);

Why result.Succeeded return failed in ASP Identity

When trying to add the ability to add a name during registration, an error occurred when logging into the account. When I register, the login is successful, but

Unable to start program, Access is denied C# net6.0

I have this issue where some of the projects I created for.Net6 throws the error shown in the image attached In this instance the project was running fine, sud

Using e signature in .net core application with time stamp

I am building an data entry application using .net core. When adding a new row in my database, I need to allow user to add e signature. The workflow will be lik

How do I hide login view after a condition?

I want to restrict a view after a user login into system. Example: I have a register view. After a user login into system I want to block access to register vie

VSCode ASP.Net Core 6.0 launch chrome browser

I am using the latest version of VS Code. I have the following launch.json: "serverReadyAction": { "action": "openExternally",

Serilog with Graylog not logging

I have a Web API and I'm trying to log messages into Graylog, using Serilog. Now matter what I do, no messages are shown in my Graylog application. This is what

"mes":"Value cannot be null. (Parameter 'source')" when want to show value which is true in view with checkbox

Hi I have 3 tables: Role , Permission , RolePermission In my Razor page view I want to show each permission that is true for a special role with marking the che

Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware: Error: 'MS-ASPNETCORE-TOKEN' does not match the expected pairing token, request rejected

I am receiving this error, Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware: Error: 'MS-ASPNETCORE-TOKEN' does not match the expected pairing token, req

EntityFrameworkCore Performance tuning when filter one dbcontext object using the other dbcontext object

I asked something similar recently and it got solved by using AsQueryable: How to save time when pulling data from DB using Entity Framework Core in controller

Render CSV example for swashbuckle

I have an API that can return an csv or json, deppending on the Accept header mimetype. I've decorated the method with [Produces("application/json","text/csv")]

Building Offline capabilites in ASP.NET Core web application

We are building a project management web application using those main technologies:- ASP.NET Core MVC SQL Server + Entity Framework HTML, CSS & Bootstrap Th

Minimal API Registering Dependencies

I am trying to register dependencies but one thing that is strange is when using specific handlers. For example, take a simple scenario like: using Microsoft.As

I'm getting CORS error with CORS configured on ASP.NET Core Web API app

I have an ASP.NET Core Web API hosted in Azure. When I'm trying to make a fetch request from my web app hosted on Vercell, I'm getting this error: Access to fe

ASP.NET Core Razor Read related data into table

I am trying to create a asp.net core 2.1 razor website that will load two tables on the one page. Below i have defined my classes ItemMasters and DealMasters. I