85,421 questions
0
votes
2
answers
60
views
Entity Framework Core: how to get the list of attribute codes for each item?
I am writing a Web API endpoint, data comes from SQL Server, and I'm using EF Core 8.0.
I have a table of products and another table that maps the product codes to product attributes (one-to-many) ...
1
vote
0
answers
37
views
ComponentSpace - SSO - ISamlServiceProvider.SamlState is empty during GetLocalSPConfiguration Intermittently
I have recently added Component Space to my .NET 9.0 based web application, to facilitate SSO.
It worked fine for few days, then I faced an issue, where the 'configurationName' is becoming empty for ...
0
votes
0
answers
18
views
SimpleIdServer: Setup an SPA PKCE client by code on the IdServer
Using simpleidserver 6, I am trying to implement a dedicated Id server for an SPA application using PKCE.
This SPA authenticates with no pb if it is setup for other Id servers like Azure EntraId or ...
0
votes
0
answers
43
views
Authentication not working in Swagger with .NET 10
Previously when using .NET 9, I could authenticate in Swagger using an Authorize button and auth-protected endpoints would have a "lock" icon on them:
But now when using .NET 10 and latest ...
Advice
1
vote
3
replies
74
views
Which design pattern should be used for the backend of a web application?
Description: I am building a web app, let's say about an organization for approving participation in a free service. There will be the following roles:
Organization employee
Citizen
Administrator
...
-2
votes
0
answers
34
views
Dapper Mapping not working as expected. Using myql, asp.net core web api [closed]
I am fetching ProductTransfer table together with related products. Although the total records = 1200, am only getting three records returned by my api.
Here is my models
public class ...
1
vote
1
answer
52
views
ASP.NET Core 8 IProblemDetailsWriter fails when using [ProducesResponseType(typeof(T), 201)]
I have an ASP.NET Core Web API controller action that returns a 201 Created response with a custom type, and I also have a custom exception handler that writes ProblemDetails for 400–500 errors.
The ...
1
vote
0
answers
57
views
How to log Headers or Cookies added to outgoing http-request by SocketsHttpHandler
I have a typed HttpClient, added to DI like this:
builder.Services
.AddHttpClient<IExternalApiClient, ExternalApiClient>()
.ConfigurePrimaryHttpMessageHandler(() => ...
Best practices
0
votes
4
replies
69
views
Should I create navigation properties for BaseEntity's CreatedBy/ModifiedBy fields in Entity Framework Core?
I'm building an e-commerce application with ASP.NET Core Web API using Entity Framework Core and ASP.NET Core Identity. I have a BaseEntity class that tracks audit information (who created and last ...
1
vote
1
answer
94
views
Conflict between Microsoft.AspNetCore and System.Security.Cryptography.Pkcs
I'm running into a conflict when trying to include both of the following packages in a project:
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="10.0.0" /&...
-1
votes
2
answers
92
views
Angular BASE_URL replacement in Angular 18?
For Angular 6.0-8.0 used with .NET Core 3.1, it was possible to inject the BASE_URL as string in constructor.
What is now the equivalent for the BASE_URL in Angular 18 + .NET 8? How should I approch ...
0
votes
1
answer
107
views
OpenApi 3.1 and AddOpenApi in ASP.NET Core application Int32 vs. String
Well, I'm somewhat stuck here and I don't know which side is doing things it's not supposed to do. I'll try to outline the issue first.
I have an API call which is defined like this:
[HttpGet("...
2
votes
0
answers
57
views
Embedded Views in ASP.NET Core 10
Previously, in .NET 9 and lower, we could use RazorRuntimeCompiliation to implement embedded views in assemblies.
services.Configure<MvcRazorRuntimeCompilationOptions>( options =>
{
var ...
Advice
0
votes
2
replies
54
views
ASP.NET Core 10 integration tests using multiple web projects/entry points
When creating integration tests for ASP.NET Core 10 web apps, we use the WebApplicationFactory<TEntryPoint> class. When a single ASP.NET Core web project is used as SUT, it's simple and it works:...
0
votes
1
answer
36
views
"No operations defined in spec!" when using MMLib.SwaggerForOcelot to build combined swagger for Ocelot
This is my ocelot configuration...
{
"Routes": [
{
"UpstreamPathTemplate": "/api/test/{url}",
"DownstreamPathTemplate": "/api/{url}",...