3,058 questions
-1
votes
0
answers
41
views
How to read registry in .NET 5?
I would like to be able to read a value from a registry key on Windows in .NET 5. All resources suggest to simply add using Microsoft.Win32; but I am unable to build.
When attempting to build the ...
2
votes
1
answer
51
views
XML Digital Signature valid locally but rejected by remote server when running in Linux Docker container (.NET 5/WCF)
I have an ASP.NET Core 5 Web API that constructs a SOAP request, signs portions of it with XML Digital Signatures (RSA-SHA256, Exclusive C14N), and sends it to a remote SOAP service.
The request ...
1
vote
1
answer
89
views
asp-area in forms generate the wrong route
I have a problem with ASP.NET Core 5. When I use asp-area as the example below:
<form asp-area="Admin" asp-controller="User" asp-action="Register">
The generated ...
1
vote
1
answer
148
views
How to generate protobufs for C# 9.0 that will not use the "global usings" feature
I have a C# project that uses protobufs, but I need to backport it (under duress) to .NET 5.0.
When I do so, the compiler says
/myproj/path/Protos/obj/Debug/net5.0/Protos.GlobalUsings.g.cs(2,1): error ...
0
votes
0
answers
82
views
XML parsing in .NET 5 on Linux fails with OpenSSL dependancy. Why?
I’m having trouble getting XML files to work with my .NET 5 app on Linux. The code just crashes when I try to load an XML file — no exceptions, no warnings, just a hard fail.
Here's some code:
...
0
votes
1
answer
107
views
Limit argument length in console output while keeping full length in log files using NLog
I have configured NLog (5.3.4) in my ASP.NET Core project (.NET 5.0) and am using ILogger from Microsoft.Extensions.Logging which is injected through DI. Now I'm logging messages with parameters like ...
0
votes
1
answer
70
views
ASP.NET WEB API change the JSON in response as it is supposed to return
So I am currently building an ASP.NET WEB API with .net5 (I am working as an intern in a company where we only have .net5 apps unfortunately).
To make it short, I have a "Component" table in ...
1
vote
1
answer
49
views
AWSSDK.S3 file upload corrupted on .NET 5
Anyone got a problem on upload on s3 that the file uploaded is corrupted.
Uploaded Sample Preview:
00000000 31 34 30 30 30 3B 63 68 75 6E 6B 2D 73 69 67 6E 14000;chunk-sign
00000010 61 74 75 72 65 ...
0
votes
1
answer
206
views
ASP.NET Core web application hosted on IIS is caching CSS and other wwwroot content in a way a Ctrl+F5 won't refresh
I've generally released applications on .NET Framework 4.8 on IIS and have never had the problem I'm having with this ASP.NET Core 5.0 application.
In Startup.cs, I have:
app.UseStaticFiles();
app....
0
votes
0
answers
24
views
Created .Net 5.0 EXE using Graph API, but after upgrading to 8.0, exe is not working
Created .Net 5.0 EXE using Graph API. Since 5.0 is outdated, server got upgraded to .Net 8.0. So we also changed the Target Framework of the exe to 8.0.
When we execute the exe in Windows Server 2019, ...
1
vote
1
answer
105
views
Optimize Code Snippet Skipping Loop Iteration
I've the below method to get user group data. The list of ids I am passing as follows:
Input:
var list = new List<int> { 1002, 1004, 1006, 1008 };
Method:
public async Task<ResponseBase> ...
0
votes
1
answer
270
views
Ignore Comma Delimiter in CsvHelper
I've a project that uses CsvHelper package to parse excel file. Unfortunately I came into a condition where I've to ignore comma as delimiter that CsvHelper does by default I believe. The data in a ...
0
votes
2
answers
239
views
Ignore Properties That Are Inherited From Base Class
I've a base class User that's used by EF Core and here's the configuration for that as follows:
public class UserConfiguration: IEntityTypeConfiguration<User>
{
public void Configure(...
-2
votes
2
answers
95
views
Apply string. join on Dictionary<string, List<int>> [closed]
I have situation where i have a dictionary of type Dictionary<string, List<int>> . I would like to apply sting.Join to it, I would like to have data displayed like:
"abc1:1,2,3,4,abc2:...
0
votes
0
answers
390
views
Auth0 Failed With Status 400
I am trying to create users from ASP.NET Core 5 Web API project for Auth0, was going through this official doc to make it work - Create User. Everything looks good through I am continuously getting ...