Category ".net-core"

How do I make a .NET Core 6 Top-Level statement template async?

I'm follwoing this guide: https://docs.microsoft.com/en-us/dotnet/core/extensions/configuration and I don't understand how to make my application work as an asy

Accessing the parameters injected in ConfigureServices from custom Middleware

I am practicing to learn more about the Dependency Injection and the Middleware in ASP.NET Core and I have faced an issue I can not resolve, so need the assista

ASP.NET Core 5.0 MVC : CS1061 error using Html.RenderAction

I am working on a project using ASP.NET Core 5.0 to build a web app (MVC). I tried to use the Html.RenderAction extension method but I get the following error.

How to install specified framework in Teamcity server as a build step

I have dotnet project built using dotnetcore v2.0 which was working fine in Teamcity pipeline. I have updated the project to use dotnetcore v3.0 and re-run the

Relationships in Entity Framework with users from AzureAD

I'm relatively new to Microsoft solutions and I need your guidance. I'm quite certain the answer exist somewhere, but I lack key words for my searches. My stack

Get the raw request that is sent with HttpClient and HttpRequestMessage

In my C# code running .NET 6 (Azure Function) I am sending an HttpRequestMessage using HttpClient. It doesn't work but it should work, so I want to get the raw

Subscriptions are not creating in the report server database

I have written the code to create the subscriptions by adding the reference to ReportService2010.asmx. Please see the below screenshot for code and result [Id =

.net core linq select overload index does not work

I got a linq lambda select code that works before I added the Select index overload. Before, I got the list of records but I need the index which I use to assig

Optimistic Concurrency Exception

I have been battling with this error for a while now. I hope putting it here will help. I have attached by models and also the method call being made. The erro

C# - WCV using class from .net core project

I have some problem with my project, i'm making application in .net core but i also need to create api, i want to make "wcf service" and now i can't use class f

Set service startup options for .net core worker service

I am trying to create a Windows service by writing a .NET 5 worker service, and I am hung on where in my code I would set up the service as auto-start, auto-sta

Is there a way to list down only the custom dotnet templates installed?

dotnet new --list lists all the built-in and custom templates installed. But I want to list only the custom templates that I have created and installed. Is ther

Client HTTP/2 request on .Net Core 3.1 throw "HTTP/2 error code 'PROTOCOL_ERROR' (0x1)"

I've got a problem with HTTP/2 request by HttpClient to the external service by HTTPS on .Net Core 3.1 : var httpClient = new HttpClient(); var request = new Ht

How do you deploy WireMock.Net as an Azure Web App

I am trying to deploy a ASP.NET 6 App which contains WireMock.NET as a hosted service. According to WireMock.NET's wiki this is possible and I'm basically using

Not able to get all the logs in application insights even after disabling sampling

I am generating logs for my client application where there is very limited internet connectivity. I am storing the offline logs and generating it to applicatio

Why $(SolutionDir) is undefined in dotnet CLI?

I'm trying to build my project from dotnet CLI. I'm using dotnet build and it fails. How to reproduct: Create a simple console application using Visual Studio t

dotnet 6 minimal API circular serialization

I am new to dotnet, trying out dotnet 6 minimal API. I have two models: namespace Linker.Models { class Link : BaseEntity { [MaxLength(2048)]

How can I reduce the amount of files produced by dotnet publish command line? [closed]

I tried to publish my dotnet app using dotnet publish --output publish --configuration Release but the result not as expected because the last

Validate with Bouncy Castle ECDsaSigner

I am trying validate the message digest hash using eCDsaSigner with R and S but VerifySignature returns false . Is it possible to get more information as to why

Consume SSL Secured APIs in ASP.NET Core 6 MVC Client

We have an application that has two projects as follows (1) AppClient – This dotnet core MVC project and it is running on WebServer on IIS (2) AppService