Category ".net-core"

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

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

How to set default values for a query param with array type in .Net.Core with Swashbuckle by code

I am currently working with .NET Core 3.1 and Swashbuckle library. I have made several endpoints with requests decorated with attributes and proper swagger desc

How to call RedirectToAction in asynchronous Task methods?

I am using MVC aspnetcore dotnetcore 6.0 I do an authorization with a LoginController. When it is success i want to redirect the user into HomeController. But R

Insert data in a table from another model In .NET Core MVC

I'm trying to build a quiz application and i want to insert the user's answers after the quiz is submitted. this is my question model: public class Question {

Outlook Calendar .Net Core Web API GetList (tokenCredential parameter cannot be null. (Parameter 'tokenCredential'))

I have an API project related to Outlook calendar integration. With this project, you can access your outlook account. I want to list all the events in the cale

Dynamically generate lambda expression

I have the following class: public class Movie { public int MovieId { get; set; } public string Title { get; set; } } I want to create a lambda express

Kafaka Subscriber not receiving the messages

I am writing sample applications in .Net core to interact with Kafka. I have downloaded Kafka and Zookeeper official docker images to my machine. I am using Con

Addig User And Role to my UserRole table - Never used column name is missing

I am trying to add Role to my User and store the UserID and the RoleID in the UsersRoles table. var userRole = await _roleManager.FindByNameAsyn

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

Use .Net framework 4.7.2 in .net 6 application

I am trying to find out if it is possible to use a .Net Framework 4.7.2 assembly in another .Net 6 libraries or .Net 6 application. I tried this with some sampl

dotNet Core 5 API Service adds objects to list but result has multiple copies of the last item

dotNet Core 5 C# Web API project, Service class adds objects (based on a viewmodel) to a list. Debugging shows all data correct as the object is built and adde

In XML documenttion, how do I reference another class that has the same name in the same namespace?

I have several C# packages that are closely related to each other. Each one of these has its own IServiceCollectionsExtensions static class living in the Micros

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

What is the difference between homebrew casks 'dotnet' and 'dotnet-sdk' and formula 'dotnet'

Running brew search dotnet shows the following ❯ brew search dotnet ==> Formulae dotnet

Mapster context is null in nested mappings

How I can use MapContext.Current in nested mappings? For example: public class Foo { public string Name { get; set; } } public class Bar { public strin

Why does Event Grid serialize my already serialized data?

I am trying to get into dotnet and Azure and so I build small solution that triggers a azure function by http with a count that then requests the given amount o

dotnet watch run -c $(Configuration) with hot reload

I want to launch my Blazor app with specific configuration and have hot-reload enabled. When I launch with: dotnet watch Hot reload is enabled and everything i

EF6 Entity framework sometimes slow query on SQL Server

We have started a new project in .NET Core. We are just starting out and we are hitting a Web API endpoint to get some reference data of 8 records. We noticed

Powershell running .NET Core on Linux RedHat giving SSL error connecting

I am currently trying to use dotnetcore to run a script over Powershell. This script uses a library that will authenticate with Azure using a service principal