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

All Questions

Tagged with
0 votes
0 answers
27 views

Uploading file to ASP.NET Core Web API using VBA

I'm struggling to upload a CSV file from local drive to a Web API. Sub Upload() Dim objHTTP As New MSXML2.ServerXMLHTTP60 Dim url As String Dim filename, resp As String Dim boundary, ...
Mark's user avatar
  • 2,412
0 votes
1 answer
30 views

Unable to send a local image that isn't under wwwroot to openai using its new .NET library

I have an ASP.NET Core 6 Web API with the new official library from OpenAI (https://github.com/openai/openai-dotnet). What I'm trying to do, is to use a local image file to OpenAI. The file isn't ...
Moshe Az's user avatar
2 votes
0 answers
34 views

Can't use Entity Framework Core with Supabase (PostgresSQL)

I was trying to move my project from local to remote database. I've created an ASP.NET Core 7 Web API project. I've installed Microsoft.EntityFrameworkCore 7.0.20, Microsoft.EntityFrameworkCore.Design ...
fungaver's user avatar
0 votes
1 answer
64 views

How to authenticate an ASP.NET Core Web API using Azure AD token and custom claims from ASP.NET MVC app?

I have two applications: one built with ASP.NET MVC and the other an ASP.NET Core Web API. Users log in to the ASP.NET MVC application using Azure Active Directory (Azure AD). Upon successful login, I ...
ZCoder's user avatar
  • 2,293
0 votes
0 answers
72 views

API controller class for all tables

I'm creating an EF Core API to connect my MAUI app to my SQL Server database. This is my tblUser table's controller (Select, Create, Update, Delete, all the usual stuff) in the API: ‌ UserController: [...
ParSa's user avatar
  • 129
0 votes
1 answer
36 views

Google OAuth 2.0 integration in ASP.NET Core Web API project in C#

I'm getting the error when trying to log in with google . Microsoft.AspNetCore.Authentication.AuthenticationFailureException: An error was encountered while handling the remote login. ---> ...
Misu Stefan's user avatar
0 votes
0 answers
35 views

Deploying an ASP.NET Core 8.0 Web API

I am a newbie in ASP.NET. I have an ASP.NET Core 8.0 Web API. The application is to be published. On the production system (Windows) .NET Core Hosting Bundle is installed. An Apache server serves as a ...
ppp's user avatar
  • 21
0 votes
1 answer
76 views

403 from Azure only in a specific endpoint with specific version of the API

We developed a middleware service Web API app in .NET 6 with several endpoints and deployed it to Azure. We get a strange error with an endpoint that implements a POST method. If we change the version ...
oiradIta's user avatar
0 votes
2 answers
60 views

How to bind json data to FromBody Dto in ASP.NET Core Web API?

In my ASP.NET Core Web API, when I call a method that is a HttpPost and receives a DTO object in FromBody, and sends extra fields that are not in SourceUrlDto, I fail during binding on the code side. ...
Ahmet Kalem's user avatar
0 votes
1 answer
67 views

API cannot see Website middleware assignments to HTTPRequest

I am trying to understand why the API cannot see what assignments I am making in the middleware of the Website. public async Task InvokeAsync(HttpContext httpContext) { try { ...
cyimxtck's user avatar
0 votes
1 answer
46 views

How replace OneOf to AnyOf in swagger generation

I have a c# code that generates swagger services.AddSwaggerGen(options => { options.UseOneOfForPolymorphism(); options.SelectDiscriminatorNameUsing(_ => "messageType&...
AGDev's user avatar
  • 35
1 vote
0 answers
40 views

ASP.NET Core Web API : authentication users files

I'm working on an ASP.NET Core 6 Web API project where users upload their own files, and these files are stored in folders corresponding to their IDs (GUIDs) on the same Linux server. To serve these ...
Elchin Heydarov's user avatar
1 vote
1 answer
54 views

CancellationToken not working in ASP.NET Core Web API HostedService

I have an ASP.NET Core 8 Web API that has a HostedService and a controller. The controller uses an interface that the HostedService also implements so that the service may be started, stopped, or ...
Lee Z's user avatar
  • 944
0 votes
0 answers
83 views

ASP.NET Core 6 Web API : JWT never refreshes in the API

The primary question is this: why can I not send the API a single string in the requests without trying to access the HttpClient or HttpRequestMessage, or have the Auth Header actually work correctly? ...
cyimxtck's user avatar
1 vote
2 answers
34 views

How to access Route parameter in Custom validator in ASP.NET Core Web API?

I have implemented a custom model validator using data annotations, where I wanted to compare two dates and validate if one is greater than the other, or not. It works fine in POST (create) endpoint. ...
MB22's user avatar
  • 21

15 30 50 per page
1
2 3 4 5
306