.net-core Questions

4

Solved

I have a .NET minimal API project, as described here. One of the endpoints accepts JSON in the request body, and this is deserialized automatically. The code looks something like this: app.MapPost(...
Cockloft asked 15/9, 2023 at 7:51

1

I've been given an IFileProvider and I'm trying to use it monitor a directory for file updates via the Watch() method. private void WatchDirectory(IFileProvider fileProvider, string directoryPath ...
Zygosis asked 16/9, 2019 at 16:20

2

Solved

When hosting a .NET core web application in IIS, you can choose between in process and out of process hosting model. Except for better performance by using in process, what are some pros and cons...
Sycophant asked 13/12, 2019 at 10:32

3

Solved

I have a database table created 20 years ago in my company, it is only used for journaling, with NO PRIMARY KEY or INDEX. I can't alter that table. I understood that we need to call HasNoKey() in ...
Aflcio asked 6/2, 2020 at 13:53

3

I am using Asp.net 6 web API in my project and I am confused about understanding routing functions. Previously when we build API we use to use following middleware app.UseRouting() ...Other middle...
Woodworking asked 29/4, 2022 at 20:57

4

Solved

I am creating a custom .NET Core ILoggerProvider that requires some dependencies to be passed into its constructor. I believe I am using a fairly common pattern to initialize my logging implementa...
Achaea asked 22/6, 2018 at 15:43

4

I have one .Net Core Razor pages app which is trying to call a .Net Core API with a class library created using Refit. I have created one Refit API interface which uses a model with enum as one of ...
Affirm asked 23/8, 2021 at 6:40

3

When debugging a new .net core website (file => new project) in Visual Studio 2017, I am prompted with the question if I wish to trust the self-signed IIS express certificate: However, after cli...
Facture asked 4/11, 2017 at 9:41

8

Solved

I'm French, and like to have the Windows UI in French, but all my dev tools in English. The dotnet CLI tool displays its output in French, and I'd like to force it to English. Is it possible?
Discrete asked 7/5, 2018 at 15:1

6

After upgrading .NET core from 2.0 to 2.1 I started getting following error when running the tests: The program '[12372] dotnet.exe' has exited with code -1073741819 (0xc0000005) 'Access violat...
Lisalisabet asked 30/11, 2018 at 12:43

4

Solved

I upgraded my project to .NET 8 today; I followed the official guide on migrating from .NET 7 to .NET 8. However, upon deploying the application, I've encountered a problem. Locally, the solution b...
Subjection asked 23/12, 2023 at 17:19

3

Solved

I'm injecting typed HTTP clients in a .NET Core app. I'm also logging with Serilog. I have not intentionally configured any logging of HTTP activity. It magically came with. How do I turn this off?...
Ventriloquy asked 20/8, 2020 at 19:14

3

Solved

I am trying to convert a .NET Framework WPF app to .NET 5 I ran https://github.com/dotnet/try-convert, and removed some incompatible DLL refs. Now, when I try to compile, I am presented with NETSDK...
Foredo asked 26/11, 2020 at 20:0

5

The SAP .NET Connector is not compatible with the .NET Core framework. Is there any other way to retrieve data from SAP when using .NET Core? I've already searched for an alternative in the nuget p...
Vickey asked 3/4, 2018 at 9:46

2

Solved

I try to deploy my .net core site to Azure via Publish context menu in VS2017 and occasionally (about 1 in 3 deploys), I get the error below. Web deployment task failed. (Web Deploy cannot modif...

3

Solved

What is the code-first approach to set the default value of a database column in entity framework core? Attempt #1: Using the DefaultValue attribute on the model doesn't seem to work [DefaultValue(...

2

I have a C# dotnet 5 Azure Function in VS2019 configured with "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated". If I run the function in the dev environment (ctrl + F5) while Fiddl...
Microcrystalline asked 10/8, 2021 at 9:46

3

Solved

ASP.NET Core (Version: 2.2.102) I am building an API to return Portos and Especies, but anytime that I access /api/portos (as defined in the controller), I get this error: InvalidOperationExcep...
Phillada asked 17/1, 2019 at 15:56

2

Solved

I'm running BenchmarkDotNet against the following code on .NET 8: using System.Runtime.InteropServices; using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Running; [StructLayout(LayoutKind.Ex...
Maricruzmaridel asked 29/7 at 14:18

5

Solved

I'm using ASP.NET Core as a REST API Service. I need access to request and response in ActionFilter. Actually, I found the request in OnActionExcecuted but I can't read the response result. I'm try...
Spiegelman asked 5/12, 2018 at 6:37

4

Solved

I'm trying to convert appsettings.json to C# class I use Microsoft.Extensions.Configuration to read the configuration from appsettings.json I write the following code using reflection but I'm looki...
Ulrikaumeko asked 18/1, 2021 at 22:2

2

Solved

I want to know the reason why my C# date is larger than the SQL date even though the C# code is running first and after that the SQL query, Logically the SQL date should be greater than C# date. Fo...
Ellanellard asked 25/7 at 11:17

5

Solved

In porting a .net framework app to .net core app, there are some uses of String.Copy to copy strings. But it looks this method is removed from .net core, so how would you copy a string in .net core...
Decentralize asked 20/1, 2017 at 7:35

3

Can someone explain the purpose of these two in the csproj file (VS2017): <TargetFramework>netstandard1.6</TargetFramework> <RuntimeIdentifier>win7</RuntimeIdentifier> I ju...

4

I am trying to create a prerelease build for a .net-standard 2.0 library in VSTS. I have created a build with the following steps dotnet restore version 2 dotnet build version 2 dotnet pack versi...
Syllogism asked 11/7, 2018 at 14:50

© 2022 - 2024 — McMap. All rights reserved.