Category "asp.net-web-api"

How to return a file using Web API?

I am using ASP.NET Web API. I want to download a PDF with C# from the API (that the API generates). Can I just have the API return a byte[]? and for the C# ap

ASP.NET Core: Error while Updating Migration (Database first approach)

I have created an application in .NET Core where I am trying with database first approach. I was able to add Migration using "Add-Migration InitialCreate" but

Make sure that the controller has a parameterless public constructor error

I have followed this tutorial which has worked great, until I modified my DbContext to have an additional constructor. I am now having issues with the resolutio

Issue: No 'Access-Control-Allow-Origin' header is present on the requested resource

My problem is that I can't access to GET method from my Angular app because of the issue: Access to XMLHttpRequest at 'https://localhost:44337...' from origin '

How to read request body in an asp.net core webapi controller?

I'm trying to read the request body in the OnActionExecuting method, but I always get null for the body. var request = context.HttpContext.Request; var stream =

Make Https call using HttpClient

I have been using HttpClient for making WebApi calls using C#. Seems neat & fast way compared to WebClient. However I am stuck up while making Https calls.

Make Https call using HttpClient

I have been using HttpClient for making WebApi calls using C#. Seems neat & fast way compared to WebClient. However I am stuck up while making Https calls.

'Could not find file ... bin\roslyn\csc.exe' [duplicate]

In Visual Studio 2017, when hitting Ctrl+F5 to run my ASP.NET Framework Web API server, I get: Could not find file ... bin\roslyn\csc.exe:

Why ASP Net Core 2.2 do not release memory?

I'm testing ASP Net Core 2.2 using default project made from: Visual Studio > File > New > Project > ASP NET Core Web Application > Next > Cr

WEB API Controller not loading in browser

Having some issues getting started in C#, here's the error I'm getting: HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its

WEB API Controller not loading in browser

Having some issues getting started in C#, here's the error I'm getting: HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its