Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [.net-core]

.NET Core is an open-source successor of the .NET Framework. It can be used in a wide variety of applications and verticals, ranging from servers and data centers to apps and devices. .NET Core is supported by Microsoft on Windows, Linux and macOS.

0 votes
0 answers
6 views

How to securely store and retrieve sensitive data in a .NET Standard 2.0 cross-platform (Windows+Linux) library

I have .NET Framework 4.7.2 library to store and retrieve sensitive data (like tokens) with help of CredentialManagement package on Windows. Now I need to make this library work both on Windows and ...
bairog's user avatar
  • 3,271
1 vote
1 answer
16 views

Why do I have to specify the runtime identifier in the csproj for a publish?

I am doing the following to build my application: dotnet build MyApp.sln -c Release dotnet test MyApp.sln --no-build -c Release dotnet publish MyApp.csproj --no-build -c Release -r win-x64 The aim ...
fharreau's user avatar
  • 2,265
0 votes
0 answers
6 views

How to analize error and stacktrace in unmanaged code in net core docker container

I have floating bug that sometimes abort my net core 6 service in docker container. Last logs that I see: [2024-07-26 08:23:57.467 +00:00 INF] ...my logs dotnet: malloc.c:2379: sysmalloc: Assertion `(...
vitm's user avatar
  • 493
0 votes
1 answer
33 views

Problem installing .NET SDK in Visual Studio Code

I'm trying to use C# in VS Code which requires me to install the .NET SDK. I'm following the steps provided by VS Code to install it, but it doesn't work, even after reinstalling it does not work. ...
Ahmad Adief's user avatar
0 votes
0 answers
52 views

Is there anyway to read from a request body directly in an action without middleware?

I want to be able to read a request body in an action while still also using default MVC behavior, which involves posting with a [FromBody] parameter. As far as I know I need middleware to accomplish ...
SventoryMang's user avatar
  • 10.4k
0 votes
0 answers
11 views

Difference between using "dotnet pack" and "GeneratePackageOnBuild"?

I understand that using dotnet pack is intended for creating NuGet packages, and dotnet publish is intended for creating deployable DLLs/EXEs. However, using the GeneratePackageOnBuild property in the ...
JMekker's user avatar
  • 169
0 votes
0 answers
18 views

Globalization of ASP.NET Core 6 MVC application

I have developed an ASP.NET Core 6 MVC application with globalization, I've created the role folder structure for Views/Controller/ViewModels .resx for each language. While debugging running on IIS ...
Tiago Martins's user avatar
0 votes
0 answers
24 views

Preventing SSRF when sending Webhooks via HttpClient

I want a server application to send webhooks (i.e. outgoing http-post requests) to user-controlled http(s) URLs. A naive implementation of that functionality is vulnerable to server-side request ...
CodesInChaos's user avatar
0 votes
0 answers
30 views

Cannot load appsettings.json after converting .NET Core 3.1 console application to .NET Core 3.1 WinForms application

There was a console .NET Core 3.1 application for SOAP communication based on IHost / IHostBuilder. New requirements came and I had to convert the application to the GUI application. I chose WinForms. ...
Paul's user avatar
  • 26.3k
0 votes
1 answer
32 views

.NET 8 Windows Service Example won't start (System.IO.IOException)

I'm trying to create a .NET 8 Windows Service. Have followed this guide: https://learn.microsoft.com/en-us/dotnet/core/extensions/windows-service All is good until I try to start it, Event Viewer ...
mhapps's user avatar
  • 1,063
2 votes
1 answer
129 views

Why is C# DateTime.Now/DateTime.UtcNow ahead of SQL Server's SYSUTCDATETIME()/SYSDATETIME() even though C# code executes before the SQL Query

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. For ...
Shivam's user avatar
  • 29
0 votes
0 answers
22 views

Why does subsequent .NET Core application consume more memory?

I have a .NET Core 3.1 application running in Docker Windows Containers on a Windows Server 2022 machine. I noticed that each subsequent application instance consumes more memory than the previous ...
Vitalii Ivanov's user avatar
0 votes
0 answers
26 views

Any pitfalls in upgrading a WPF application from .Net 6 to .Net 8?

We're looking to upgrade some large WPF solutions from .Net 6 to 8, and my understanding is that the process should be straightforward (changing the projects' target framework). But are there any ...
Andrew Stephens's user avatar
0 votes
0 answers
12 views

IRequestExceptionHandler fails to be properly resolved while response type is generic

Inspired by https://code-maze.com/csharp-global-exception-handling-for-mediatr-requests/ Using MediatR is it possible to create a generic RequestExceptionHandler for any and all requests? I was trying ...
user2184057's user avatar
1 vote
1 answer
38 views

Using FromBody with custom model binding in .NET Core 8

X is an entity that can execute some actions on through calling API. Each action has its own input model, but one generic controller endpoint like this: [HttpPost("{id}/execute-action")] ...
Nazeer Allahham's user avatar

15 30 50 per page
1
2 3 4 5
3031