Category ".net-core"

serilog format SourceContext for showing only assembly name

I configured my project to use Serilog for logging using dependecy injection. I use the following schema in the classes constructor: namespace FlickPopper.API

Identity UserManager CreateAsync does not write to database

It doesn't give any errors or warnings but it doesn't insert in the database. Seems like it's only in memory. Also UserManager's FindByNameAsync can't check use

Docker container is not running on given port in dockerfile

I am trying to run my application on docker (Linux container). In my Dockerfile i'm exposing the port 80 Dockerfile FROM mcr.microsoft.com/dotnet/core/aspnet:3.

Docker compose build error - Project file does not exist

I'm trying to create docker compose which run my ASP.NET Core app and mssql, but I'm getting an error during build. Here's my docker compose file: # Build Sta

"Could not locate MSBuild instance to register with OmniSharp" but msbuild is installed

Due to the third party system we work against, I have to use .Net 2.1, which has worked fine until recently. I develop on Fedora with latest updates and VSCode

How to SetBasePath in ConfigurationBuilder in Core 2.0

How can I set the base path in ConfigurationBuilder in Core 2.0. I have googled and found this question, this from Microsoft docs, and the 2.0 docs online but

.Net Core 2.0 Process.Start throws "The specified executable is not a valid application for this OS platform"

I need to let a .reg file and a .msi file execute automatically using whatever executables these two file types associated with on user's Windows. .NET Core 2.

Why the gzipped file uploaded to the azure blob container with a custom file extension is being downloaded as .gz via the generated sas?

Here is my method on generating the SAS: private string GenerateSasBlob(BlobClient blobClient) { BlobSasBuilder sasBuilder = new Blo

System.ServiceModel not found in .NET Core project

I have a .NET Core xUnit project. I'm trying to call a WCF service from it but get the following exception: System.InvalidOperationException occurred HResul

.NET Core 6 Windows auth and Active Directory group based permissions

I am learning dotnet core 6, and making application for Intra. I need to get user data (user name and surname, and user groups) from company's Active Directory

TeamCity Build with mixed (.Net Framework + .Net Core) projects solution - Is it possible?

Context: Consider a Visual Studio 2017 solution with number of projects targeting .NET 4.6.1; In TeamCity a MSBuild Runner is used for the build - A new .Net Co

Modify middleware response

My requirement: write a middleware that filters all "bad words" out of a response that comes from another subsequent middleware (e.g. Mvc). The problem: strea

How to Include Jquery function in a partial view in a modal

I have a jquery button click method which works fine in views other than modals.uploadbtn button click method doesn't work when partial view is loaded in the mo

Static Web Apps shows "Refused to apply style from <URL> because its MIME type ('text/html') is not a supported stylesheet MIME type"

I deployed to Azure Static Web Apps the default app that comes whenever you create a new Blazor WebAssembly app via dotnet new blazorwasm. At first it works pro

Use Serilog with Microsoft.Extensions.Logging.ILogger

I've created a .NET Core 3.1 project using a Host, the IoC container with IServiceCollection and implemented logging allover the place using the ILogger<T>

How can I enable Server GC in .NET Core?

I have a .NET Core app (MyApp.exe) developed in VS2017 running on the 1.0.4 version of the SDK. I have tried adding an App.config with the following entries: &

The required library libhostfxr.so could not be found. Netcore Linux

❯ dotnet ef A fatal error occurred. The required library libhostfxr.so could not be found. If this is a self-contained application, that library shou

The default XML namespace of the project must be the MSBuild XML namespace

I cloned the ASP.NET Core SignalR Repo locally, and try opening the solution from within the following environment. IDE Microsoft Visual Studio Enterprise 201

What is the .NET equivalent of "ProducesResponseType" from Net Core?

I have to do a "backward" from an API made with NET CORE to .NET I'm facing a problem changing [ProducesResponseType] from Net Core in a valid equivalent of .N

How to show message box on .net core Console application?

I'm developing .net core console application. I want to alert to user when want to exit application. Like below; MessageBox.Show("Contiue or not", "Question",