Category "asp.net-core-webapi"

Difference between instance of HttpClient and IHttpClientFactory in .NET Core5

Below is my Startup.cs public class Startup { public Startup(IConfiguration configuration) { Configuration = configuration;

How to monitor CPU and RAM consuming by a .NET Core application

I am working on an ASP.NET Core Web API application in which I am working with the files security. I want to monitor the maximum and minimum RAM and CPU consump

Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool issues even If I used using statement

I am working on dotnet core 3.1. I am working on API call. When I call the API, below function in Repository will execute first by saving the data: then anothe

Open Browser with a specific url on sending request on API (.Net core MVC)

Working on .Net Core MVC and IText7, I'm filling a Pdf form (empty form PDF is already saved on server). What I want is, Whenever I send request to the link (ca

How can I convert an empty string value to a nullable date value?

When I use Postman to test my API with a PUT request, I get this error: "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title": "One or more valid

ASP.NET Core - JsonSerializerOptions.DefaultIgnoreCondition not working for IEnumerable<T>

I've one ASP.NET web app running over .NET Core 3.1 into one AWS Lambda; On Startup.cs I had this configuration: services.AddControllers().AddJsonOptions(opt =&

WCF NETCORE ERROR, Unable to create an SSL/TLS secure channel

I'm trying to connect to a Web Service with two-way ssl auth, I've installed the certificates to consume, in the browser in the browser asks me for the certific

Outlook Calendar .Net Core Web API GetList (tokenCredential parameter cannot be null. (Parameter 'tokenCredential'))

I have an API project related to Outlook calendar integration. With this project, you can access your outlook account. I want to list all the events in the cale

Why does this service return null when return value is not null?

Not sure why this is happening. In the SaveRole() method when I try to hover over and see the value when debugging this line always shows null on the apiRespons

I'm getting CORS error with CORS configured on ASP.NET Core Web API app

I have an ASP.NET Core Web API hosted in Azure. When I'm trying to make a fetch request from my web app hosted on Vercell, I'm getting this error: Access to fe

Scheme already exists: Bearer

I'm implementing login using Microsoft provider also implement the default login using jwt when I run the project I got this error (Scheme already exists: Beare

ASP.NET Core 5.0 Web API deployed in App service call third party API fails intermittently and raise 500 (Internal Server Error)

ASP.Net Core Web API Call Thirds party API fails intermittently. The following exception raises intermittently when load test with postman. "Call failed with st

Session not working in ASP.Net Core Web API

I am trying to use the session capability in ASP.NET Core Web API (.NET Core 3.1). As a test, I configured my project as follows. Install NuGet package Microsof

Accepting body with generic type

I'm creating a web API that accepts a custom object. This works when someone does a POST request in JSON format. But now I have someone asking if they can post

REST Api Design - Opinion on a design choice

I have an API that is connected to a database and where I retrieve data. One schema example: The idea is to retrieve all related data based on the Application

What is the correct use of scopes and app roles in an Azure AD web api with user and daemon clients?

I have a web api to access "resources". These are not user specific resources. There is a "reader" app role. User1 is added to "reader" role App1 has been grant

how to send array to API which contains image and other data in .net core

When I am passing a single object like below then it is working as per below image [HttpPost] public async Task<ActionResult> Post([FromForm] MyModel Deta

Authenticating using Azure Active Directory with Angular 13 and .NET core web api

I have a .NET CORE 6 Api for the back end and a Angular 13 for the front end. Currently I am trying to authenticate via Angular using msal and then call the pro

Where to call EF Core Migrate in web API startup class?

I'm trying to process DB migrations during application startup in a Azure-hosted web API. However, no matter where I try to put it, I get the exception: ObjectD

Best practicies global result - error handling in Asp.Net core 3 and Angular 9

According to Microsoft's recommendation, throwing and catching should not be used for the normal logic of the program. Minimize exceptions As part of a ASP.Net