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

Questions tagged [asp.net-web-api2]

ASP.NET Web API 2 is a framework for building HTTP services for clients like browsers and mobile devices. It is based on the Microsoft .NET Framework and an ideal choice for building RESTful services.

asp.net-web-api2
0 votes
0 answers
33 views

The Web API responds to the browser before the await Task.Delay finished executing

I'm working on an OWIN ASP.NET Web API 2 application which uses Autofac. I ran into some issues because some code after await is never executed when the client app (browser) is cancelling the request. ...
user25652029's user avatar
0 votes
0 answers
46 views

Http PUT method is not working in OData Web API service

I have exposed a SQL Server table using Web API and OData service in C#. In my service, the Get() method is working fine, but the PUT method is not working and I get this error System....
hellraizer's user avatar
0 votes
1 answer
57 views

In ASP.NET on .NET 4.8, does the StreamContent get buffered by ASP.NET or IIS?

I'm used to working with .NET 6+ self hosted Web API, but now I'm working on an ASP.NET Web API running on .NET 4.8 and hosted in IIS. I'm creating an endpoint to download files and they can be very ...
JHJ's user avatar
  • 335
0 votes
1 answer
72 views

How to properly use HttpClient in .NET 4.6.1 + ASP.NET Web API 2

I am creating this article using machine translation. Please forgive any grammatical errors. I am maintaining an ASP.NET Web API 2 that runs on .NET 4.6.1. (Don't mention the end of support! I have ...
hiro's user avatar
  • 11
0 votes
0 answers
34 views

Entity Framework migrations: custom initializer not applying migrations as expected

I'm working on an ASP.NET Web API 2 project, using .NET Framework 4.8 and Entity Framework 6, and I'm facing an issue with custom migrations. I need to deal with two situations, one where there is a ...
Paul's user avatar
  • 1,254
-1 votes
1 answer
111 views

How to enable https on AKS hosted ASP.NET Core 6 Web API?

I am working on enabling https on AKS hosted ASP.NET Core 6 Web API. I found various samples online and I have couple questions around it. I am sharing part of relevant code here. Hope someone can ...
Pankaj Kapare's user avatar
1 vote
1 answer
66 views

Downloading files larger than 2gb via web api

I have an API that I'm connecting to when downloading a file from our website (Angular). The user clicks the link and the website shows the download progress then the browser shows the Downloads ...
Robert's user avatar
  • 1,716
1 vote
1 answer
51 views

Run different apis project under one main project

I have total 5 API project in one solution and one main project, please see below image. Now what I want is when I run that main project then it should start this all APIs project also. So if I start ...
Sami In's user avatar
  • 330
0 votes
0 answers
28 views

How to make Swagger provide an upload operation for an interface?

Using ASP.NET Web API 2 requires an interface to read the file stream, how to make Swagger aware of it. I'm using the .NET Framework 4.8.0. This is my main code, I'm reading the file stream from ...
Yogi's user avatar
  • 36
0 votes
1 answer
35 views

Using WebSockets with ASP.NET Web API2

I use my webapi in my intranet with works fine and deactivated any cors policy because i dont need them. Now i want also to have a websocket into my iis app but when running it only localhost works as ...
Yusuf Keks's user avatar
0 votes
0 answers
24 views

Twilio ASP.NET Web Api Request Validation - 'Specified method is not supported' When Attempting To Read From Content Stream

I'm using this request validation filter attribute from Twilio's website. https://www.twilio.com/docs/usage/tutorials/how-to-secure-your-csharp-aspnet-web-api-app-by-validating-incoming-twilio-...
ctdev123's user avatar
1 vote
1 answer
226 views

Hot to write a FileUpload method in a WebAPI using NSwag?

I'm currently working on a ASP.NET WebAPI 2 (.NET 4.7.1) using NSwag 13.19.0. I managed to integrate a file upload into my WebAPI, like described here by @squadwuschel: NSwag Wep Api 2 multipart/form-...
FunThom's user avatar
  • 61
0 votes
0 answers
41 views

How should I format an Angular POST to a WebAPI endpoint?

I am trying to send an image from an Angular app to the endpoint. However, I get the following exception from the backend : Http failure response for http://localhost:[port]/api/sendimage: 415 ...
Victor Mazilu's user avatar
0 votes
1 answer
58 views

How to configure route path to direct controller instead of getting method name

Code img Config img This is a C# ASP.NET Web API program running on .NET 4.8.1. I've tried leaving out the ActionName, and I've tried a method called Get(), but it doesn't work. I would like to access ...
Yogi's user avatar
  • 36
0 votes
0 answers
11 views

Crystal Reports Export Takes Longer After Inactivity in Web API 2 Application

I have a Web API 2 application deployed on IIS, where I utilize Crystal Reports to export .rpt files to PDF format. In my production environment, I'm encountering an issue where the export operation ...
Mai Hegazy's user avatar

15 30 50 per page
1
2 3 4 5
515