Category "asp.net-core"

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

How can I log messages from an ASP.NET Core application to a specific file on Linux?

I installed an ASP.NET Core application as a Linux daemon. By default .NET writes logs into /var/log/message but I would like the application to write its logs

oData Patch Delta parameter doesn't list any changed fields?

I'm using Abp Boilerplate ASP.Net Core and Angular. I've implemented odata as per the odata AspNetCore Integration document and it works fine retrieving data. I

Unable to resolve service for type 'Microsoft.EntityFrameworkCore.Storage.TypeMappingSourceDependencies'

When I'm trying Add-Migration, following error was occurred. I'm using, <PropertyGroup> <TargetFramework>net6.0</TargetFramework> <