Category "asp.net-core"

HttpContext.SignInAsync() doesn't authenticate the user

I have been trying to create a custom login feature in ASP.NET Core 2.1. However, it doesn't seem the work and I have no idea why. This is run in the controlle

Connect to Azure Service Bus with Amqp over WebSockets using new Standard library

I am trying to send a message to my queue hosted in azure. My application communicates with the world through a proxy. I use the .Net Core 2.1 and the new the

How to test a .NET 4.8 client running against a .NET 5.0 server in a developer-friendly way?

I don't know if this question is appropriate for this forum. I am developing a C# ASP.NET Core webservice and a client-side library that uses this webservice. A

Why is web.config getting created on publish not on build the project in Asp.Net Core API?

I have Asp.net Core 3.1 API project. When I build it doesn't create any web.config file, but when I publish the API using VS 2019 in a folder, it creates a web.

EF Core - generic way to merge child records based on current db state and equality

I have a scenario where during an Update request of a parent entity, I have a collection of children entities in my dto, and want to merge them in the DB so tha

How to generate heap overflow error using c#

I want generate a heap overflow error and slow down the system, however I have created alot of objects on class level, later on creating that class object milli

Awaiting localhost to reload in ASP.NET Core

I have an ASP.NET Core server, which is using SignalR to generate HTML pages dynamically at runtime through JavaScript. After i shut my application down, in the

How to add bearer token authentication to typed HttpClient in Asp.Net Core 6

I'm trying to setup a web api using ASP.Net Core 6 so that users can hit my end points and then I do some work in D365 behind the scenes using a privileged acco

Unable to Deserialize HttpResponseMessage to Model Object

Code for Getting the Response: public async Task<List<RepositoryListResponseItem>> MakeGitRequestAsync<T>(string url) { List<Repositor

How to use "Azure storage blobs" for POST method in controller

I am creating an app where user can upload their text file and find out about its most used word. I have tried to follow this doc to get used to the idea of us

How to create Product Attribute Combination in asp.net core?

Product Name Color Size T Shirt Red Small Pant Yellow Large Green Desired results: T Shirt Red Small T Shirt Red Large T Shirt Yellow Small T Shirt Yellow

Microservice architecture Database rollback

I am having a microserice architecture with multiple services, each containing their own Database, and a Gateway which is considered as the business logic. Gat

Using eShopOnContainers .NET microservices architecture - Use AD B2C instead of IdentityServer4 for microservice authentication

I have downloaded eShopOnContainers that is a .NET Microservices Sample Reference Application for microservices architecture and Docker containers. https://gith

Turn `ReloadOnChange` off in config source for WebApplicationFactory

This is both a question and an answer. I've fixed my problem, but it seems a bit wrong. My original problem is running my asp.net core integration tests in a b

SqlException (0x80131904): Cannot open database "DBName" requested by the login

I have the following connection string in ASP.NET Core, but I get the following error: Microsoft.Data.SqlClient.SqlException (0x80131904): Cannot open dat

Web Api Return File with additional data

I'm returning a file as follows: public async Task<IActionResult> GetFile(string id) { try { Get

Blazor wait for ef core to finish request

So right now I get a Error: System.InvalidOperationException: A second operation was started on this context before a previous operation completed. Because bla

Image.FromStream throws Parameter is not valid error only on linux

I have some Unit Tests made in .net core that checks if the file which is uploaded from angular frontend is actually resized on the backend. I have a service th

Cannot create database migration on EF Core but It can when you ask to EnsureCreate database

I am trying to inject some repository to a service and some services to a controller but I am using the DbContext is an assembly that is not the startup projec

Cannot create database migration on EF Core but It can when you ask to EnsureCreate database

I am trying to inject some repository to a service and some services to a controller but I am using the DbContext is an assembly that is not the startup projec