Skip to main content
Filter by
Sorted by
Tagged with
15 votes
4 answers
14k views

Please help me with this, it looked easy at first, now I'm late in the project: I'm trying to setup API versioning for a ASP.NET WebApi project, along with Swagger. The API versioning works fine, ...
327 votes
16 answers
377k views

I am trying to call a web API from my web application. I am using .Net 4.5 and while writing the code I am getting the error HttpClient does not contain a definition PostAsJsonAsync method. Below is ...
156 votes
4 answers
69k views

I am following this tutorial for creating an ASP.NET Core Web API, and in the section on adding a controller, the tutorial gives code to replace the template code for a controller. One of the things ...
1 vote
1 answer
1k views

I have an ocelot gateway that is routing API requests to multiple microservices that are supporting multitenancy. However, I wanted to use the azure storage APIs to simplify the solution instead of ...
271 votes
23 answers
416k views

I'm working on a ASP.Net Core 2.0 project using Entity Framework Core <PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.1" /> <PackageReference ...
0 votes
0 answers
47 views

I am working on a legacy Web Forms project written in VB.net. When an authorized client makes a bad request, my application response returns a full stack trace that I want to hide. I have a redirect ...
6 votes
2 answers
10k views

I am trying to hit an API from C# code. I am unable to get the response and receiving the status code "500 - Internal Server error". Found the reason that the "Charset-UTF8" is getting appended in ...
2 votes
1 answer
3k views

One of the endpoint in my API is for uploading a file and submitting details about the file . The API is implemented in ASP.Net Core. NSwag package is installed in my project. OAS 3 specification is ...
3 votes
5 answers
15k views

I want to get some inputs values from the user by using a form and save it in the database. Then I want to display the saved data using this same form. But even though I get the values from these ...
0 votes
1 answer
59 views

I have created a ASP.NET Core Web API app with Docker enabled just using the auto generated boilerplate code. Running on Docker on my Windows dev machine works just fine. But when I deploy the app to ...
0 votes
0 answers
47 views

I am running an ASP.NET Web API application for .NET Framework 4.7.2, and when I try to run it in on my Windows 11 dev machine via IIS Express, the app is crashing with the following error: HTTP ...
22 votes
5 answers
108k views

I am consistenly receiving the following error when developing and authenticating locally in Visual Studio: AuthenticationException: The remote certificate is invalid because of errors in the ...
214 votes
9 answers
293k views

I am developing an API to expose some data using ASP.NET Web API. In one of the API, the client wants us to expose the date in yyyy-MM-dd format. I don't want to change the global settings (e.g. ...
538 votes
19 answers
464k views

I have an ASP.NET Web API (version 4) REST service where I need to pass an array of integers. Here is my action method: public IEnumerable<Category> GetCategories(int[] categoryIds){ // code ...
3 votes
1 answer
202 views

I have my ASP.NET Core 9 Web API app using custom ExceptionHandlerMiddleware Middleware to handle all exceptions as shown below: public sealed class ExceptionHandlerMiddleware(IWebHostEnvironment env, ...
0 votes
1 answer
57 views

I'm trying to publish an old ASP.NET web project on IIS (Internet Information Services). However, when I click on Handler Mappings in IIS Manager, I receive the following error message: SSL Settings ...
21 votes
4 answers
25k views

In MVC I simply make the class NinjectControllerFactory that implements DefaultControllerFactory interface then do some bindings in it. at last in Global I run it: ControllerBuilder.Current....
0 votes
1 answer
39 views

I'm working on an ASP.NET Core application running inside a Docker container. I have an API endpoint that processes a file asynchronously. The method picks a pending file, triggers an async validation ...
1 vote
0 answers
65 views

I have a .NET 4.8 (migrated from .NET 4.5.2) ASP.NET Web API that I have deployed to a dev server and it is working fine. I take the same code and deploy it to a qa server, and I am getting the ...
0 votes
1 answer
37 views

I'm calling a rest endpoint that accepts a multi-part form data request. One of the fields is a file and I'm using a 42k test png image. I'm using the HttpClient to make the request like so: using var ...
191 votes
17 answers
107k views

How do I configure my mvc/webapi project so that a webapi method called from a razor view doesn't return the loginpage when its unauthorised? Its a MVC5 application which also has WebApi controllers ...
18 votes
3 answers
84k views

I am having an issue : A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to ...
3 votes
2 answers
6k views

Anyone knows how to create an "annotation" using CRM Web API. I can create other objects such as account and contacts but annotation attachment is a no go. Seems like my object is missing something. ...
0 votes
1 answer
201 views

I wish to add a custom header parameter in Swagger for all my endpoints in my ASP.NET Web API application running ASP.NET 4.8 using NSwag. I have found many, many references explaining how to do this ...
1 vote
2 answers
681 views

I am using angualarJS and asp.net web API but my code always breaks on post request in the asp.net controller and this is the error I got An exception of type 'System.ArgumentNullException' occurred ...