Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
52 views

I have an ASP.NET Core 8 Web API running in Google Cloud Run. It uses HttpClient to call another internal API exposed via a Google Cloud HTTP(S) Load Balancer. The load balancer adds the following ...
ProgrammingLlama's user avatar
0 votes
0 answers
31 views

I'm using Scalar locally to hit my Web API endpoints in place of Swagger. When they displayed in the left hand panel they are not in alphabetical order. I've tried Googling and also tried various ...
user3742300's user avatar
0 votes
0 answers
79 views

Trying to use OpenAPI and Scalar to add authentication to an ASP.NET Core Web API. When I call my authorised controller with my bearer token, I get this response message: Bearer error="...
user3742300's user avatar
0 votes
0 answers
42 views

I'm using PuppeteerSharp in an ASP.NET Core Web API service to generate PDF documents from HTML pages. It's working really well but I've noticed that the first call is always significantly slower than ...
PaulH567's user avatar
  • 329
Best practices
0 votes
0 replies
41 views

I want to setup new .net-core microservices app, which might have 5-6 services. In future will deploy it in ECS in aws. Flow is like: Internet --> Edge gateway --> BFF gateway---> ...
sushmitgos's user avatar
3 votes
2 answers
151 views

I have a legacy ASP.NET Core 6 Web API program which I cannot update to a newer version for various internal business reasons. I am receiving a POST request and sending back a JSON response in the ...
Psyfun's user avatar
  • 409
0 votes
0 answers
42 views

I'm building an ASP.NET Core 9 Web API project. I have an abstract parent API controller in class library and a child in API - both define a route. For the parent class, I use Microsoft.AspNetCore.Mvc....
ggffgg7's user avatar
3 votes
1 answer
118 views

I'm currently working on an ASP.NET Core Web API project solution that has the following three sub-project directories: - API/ - Core/ - Persistence/ For my project, I want the Core to handle the ...
Gabriel Gavrilov's user avatar
2 votes
1 answer
46 views

I have an ASP.NET Core 9 Web API and database in SQL Server. I'm trying to run them in containers, and have the API connect to the database. I have been developing this locally for a while and ...
MRichards's user avatar
  • 173
0 votes
1 answer
131 views

I'm trying to use the XmlDataContractSerializerOutputFormatter and XmlDataContractSerializerInputFormatter (yes, I have tried XmlSeralizerOutputFormatter and XmlSerializerInputFormatter so I don't ...
ksja's user avatar
  • 53
Best practices
3 votes
10 replies
273 views

I'm trying to learn how to use DTOs. Should I use AutoMapper or Mapster? I have heard some say you shouldn't use AutoMapper with some reasons. Should I do things manually? And how would I go about ...
sodiumfish's user avatar
2 votes
0 answers
67 views

I have a Blazor server app that calls a separate ASP.NET Core Web API via HttpClient. When the user logs in, the API sets an HttpOnly cookie in the response. However, the cookie never appears in the ...
Prashil Shah's user avatar
1 vote
0 answers
93 views

I'm moving a Web API project from .NET framework to .NET 10. While I have the project itself working, I'm trying to get documentation up and running with OpenAPI (Microsoft.AspNetCore.OpenApi 10.0.3) &...
ksja's user avatar
  • 53
0 votes
0 answers
27 views

I'm having a problem hosting an ASP.NET Core (.NET 6) application on IIS (Windows Server, managed via Plesk). The application starts correctly, but HTTP requests hang indefinitely (no response, no ...
Samuel German's user avatar
Best practices
0 votes
2 replies
68 views

I am using ASP.NET Core 8 Web API. I created a POST endpoint that should accept a JSON request body and return the same object. However, when I send a request from Postman with Content-Type: ...
mostafa said's user avatar
0 votes
0 answers
77 views

I have an ASP.NET Core 9 Web API project running with SQL Server. It has been developed so far locally, only with SQL Server running in Docker. I've decided to move the API project to Docker, ...
Ercüment Kalkan's user avatar
Best practices
0 votes
8 replies
128 views

I'm trying to figure out how to implement Logging in my ASP.NET Core 9.0 Web API. I don't like having to inject a logger object in every service class, so have been exploring different ways of ...
MRichards's user avatar
  • 173
1 vote
0 answers
44 views

I am developing an ASP.NET Core Web API and have the following code in my Program.cs: // Apply migrations / create database on startup using (var scope = app.Services.CreateScope()) { var logger = ...
Benjamin S. Sorterup's user avatar
0 votes
0 answers
58 views

We are building an application where there are several components that must all work together that are not all entirely in my control. First, a frontend written in Blazor Server that does some ...
Kayden Miller's user avatar
6 votes
1 answer
144 views

I'm converting an existing Web API 2 / ASP.NET MVC 5 app to ASP.NET Core 10 MVC / Web API. I'm able to return the JSON content, but if I look in Fiddler, there's extra data before and after the actual ...
ksja's user avatar
  • 53
0 votes
0 answers
63 views

What I'm trying to do is I am returning a json array of generic table from postgres function and trying to catch that json in ASP.NET Core backend and then deserialize it in generic(of type which db ...
Parth Valiya's user avatar
0 votes
0 answers
121 views

Our solution for logging and tracing in our ASP.NET Core 8 Web API uses SerilogTracing, and Azure Monitor. Following the latest advice from this article, we are seeing spans/traces for the activities ...
DmitriyMKL's user avatar
Advice
0 votes
8 replies
126 views

I was working on a server-side Web API issue where I needed to add a 2-second delay. However, my unit test was reporting the following error: Error: Expected sw.ElapsedMilliseconds to be less than ...
dotnetdevcsharp's user avatar
5 votes
0 answers
2k views

I'm using .NET 10. I want to add an authorize button in Swagger, but I am encountering the following error: The type or namespace name 'OpenApiReference' could not be found (are you missing a using ...
anony's user avatar
  • 104
2 votes
1 answer
98 views

I have an ASP.NET Core 10.0 Web API that uses controllers. I want to set the default endpoint (controller/method) if user does not enter a specific endpoint URL. I have an /about controller/endpoint ...
Sam's user avatar
  • 31.1k
Advice
0 votes
5 replies
126 views

Our ASP.NET Core Web API needs to request data from an external web service (and no, the external web service cannot be called directly from the client) and return it without modification to the ...
R. Hoek's user avatar
  • 1,145
Advice
1 vote
1 replies
221 views

The .NET ecosystem is evolving quickly. Lot of approaches to do something. First, we had middlewares for error handling. Now we have IExceptionHandler. For an ASP.NET Core Web API, do you recommend ...
ILoveProgramming123's user avatar
0 votes
2 answers
154 views

I am building an ASP.NET Core Web API with an Angular frontend using the DevExtreme DataGrid. I encounter a SqlException when trying to filter my grid by a date column: Microsoft.Data.SqlClient....
Dilshan Prasad's user avatar
Best practices
0 votes
1 replies
109 views

I'm building an ASP.NET Core 8.0 Web API and want to implement global exception handling that returns consistent JSON error responses to clients, regardless of where exceptions occur in my application....
Pourya Ziamanesh's user avatar
1 vote
0 answers
54 views

I've created an ASP.NET Core 8 Web API project. I've created a number of controllers over the last months that I've been working on this. I use the scaffolded controllers (API with EF actions) as a ...
Colin Slater's user avatar
2 votes
1 answer
322 views

I'm trying to deploy an ASP.NET Core Web API that uses DevExpress components in a Docker container, but I'm getting licensing warnings during build and a "License Invalid" red banner on ...
engboustani's user avatar
0 votes
0 answers
50 views

I’m using OpenIddict 4.x with ASP.NET Core and the authorization code + PKCE flow for a SPA. I want to support multi-tenant subdomains, where each tenant has its own frontend host, e.g.: https://...
damon shahi's user avatar
4 votes
1 answer
439 views

I am trying to implement the in the above-mentioned feature in my minimal API which is now supported with .NET 10: add builder.Services.AddValidation(); Set the [Required] on a property in my object ...
Philipp Truhetz's user avatar
0 votes
1 answer
184 views

My ASP.NET Core Web API endpoint is used to get the data from a SQL Server database. The controller calls the repository method, gets the instance of the domain class with the result from the database,...
pepr's user avatar
  • 21.1k
1 vote
1 answer
85 views

Having product-attributes relation (one to many)... public class Product { public int Id {get; set; } public string Code { get; set; } public string Name { get; set; } public List<...
pepr's user avatar
  • 21.1k
0 votes
0 answers
93 views

I am working on an ASP.NET Core Web API, and I have controllers. We have multiple controllers, and for every controller, we have common routing mentioned: Route("api/[controller]") Instead ...
cuder's user avatar
  • 68
0 votes
1 answer
90 views

I've built an ASP.NET Core Web API, and I use the built-in Microsoft Entra authentication method (not the one from the App Service). This app is deployed to an App Service on Azure. This App Service ...
Maurice Chocoswiss's user avatar
1 vote
1 answer
80 views

I am trying to configure dual JWT authentication in my ASP.NET Core Web API. My API should accept tokens from: Azure AD B2C Azure AD (Entra ID) I use a PolicyScheme (DualAuth) to auto-detect which ...
Backend Development's user avatar
0 votes
1 answer
69 views

I'm trying to log error objects as JSON in my ASP.NET Core 9 Web API. I am following the wiki in the NLog documentation: Structured logging. I have NLog.Web.AspNetCore v6.0.5 as a dependency. In ...
NeartCarp's user avatar
  • 273
1 vote
0 answers
49 views

I have an ASP.NET Core Web API. I am using Swagger, so when I run my app in debug mode, the Swagger page appears and I can test my endpoints. I also have authentication, and crucially, I'm ...
bornfromanegg's user avatar
2 votes
1 answer
124 views

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 ...
Ucrainex's user avatar
Best practices
0 votes
4 replies
82 views

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 ...
Jinn's user avatar
  • 1
0 votes
1 answer
118 views

I am working on a small ASP.NET Core 8 Web API using the Minimal API template. I'd like to be able to skip my ApiKeyAuthenticationHandler for the health check (/health path) to avoid noise in the log ...
Karnalta's user avatar
  • 538
Best practices
0 votes
4 replies
671 views

I have an application which was written years ago in VB.NET. Recently I migrated it to .NET framework 4.8. This change was smooth. Now I am planning to migrate it to an ASP.NET Core 10 Web API using C#...
Jyothish Bhaskaran's user avatar
0 votes
1 answer
107 views

I had used LibreOffice portable a while back to convert documents to PDF and I cannot for the life of me figure out how to do it again. Every time I run this in IIS Express for development I am ...
Qiuzman's user avatar
  • 1,873
0 votes
0 answers
70 views

I am building a full-stack project where: Backend: ASP.NET Core Web API (created in Visual Studio 2022) Frontend: Angular project (created separately in VS Code) Git: I initialized Git from Visual ...
Suparna Dhara's user avatar
0 votes
1 answer
161 views

I have an ASP.NET Core 8 Web API with a Swagger page using Nswag + OpenAPI3. I also have an OAuth2 security implementation which is working great. Thanks to AspNetCoreOperationSecurityScopeProcessor ...
K0D4's user avatar
  • 2,683
1 vote
1 answer
136 views

I'm getting this error : Unable to create a 'DbContext' of type 'AppDbContext'. The exception 'Object reference not set to an instance of an object.' was thrown while attempting to create an instance....
Eray Bal's user avatar
3 votes
1 answer
97 views

I have written an ASP.NET Core Web API method that works fine when testing with Swagger (on localhost in debug mode, while now the API has been published, and my URL is non-local). The API entry point ...
erict's user avatar
  • 1,541
Best practices
2 votes
3 replies
124 views

We have a strong use case, and I’d like your suggestion on how to solve an issue we're facing. We built a banking system using ASP.NET Core that allows users to view their accounts. Here's how it ...
Issa Saman's user avatar

1
2 3 4 5
196