Questions tagged as 'asp.net-web-api'

1
answer

WebAPI ASP.NET Error 404 when using GET / api / controller?

I have problems trying to fill a table using AJAX / JSON. To obtain the data I use as url /api/controlador . I've already added the .json extension and from what I understand, the problem is that the url that you are trying to access is...
asked by 15.02.2017 / 18:01
1
answer

C # - Error Basic Authentication WebServices REST and POST method

I am currently working with NetFramework 4.0 and also assigning basic authorization and I must use the following Dll System.Web.Http.Cors but I do not locate it or in the package manager of Visual Studio 2012. The class that authentica...
asked by 22.01.2017 / 22:03
2
answers

It is possible to have multiple search methods in the same WEB API control

For example, A method that searches according to the received in the "schedule" parameter of the method: [ResponseType(typeof(HORARIODOCENTE))] public IHttpActionResult GetHorariosDocente([FromUri] HORARIODOCENTE horario) {...
asked by 30.11.2016 / 21:04
1
answer

Problems to directly access the indentity tables with web api through the context.?

As I can access the tables directly, it is with the identity that I can access all the procedures as an example: var user = await UserManager.FindByNameAsync(userName); All those methods I use, but I see the need to call the context...
asked by 23.05.2016 / 01:10
0
answers

Asp Net Core 2.1 - HttpContext.User returns null

I'm doing an Api Rest using asp net core 2.1 with Vue, in which I need to get the user's data that I started session. The problem is that when I enter the browser, httpContext.User does not get the data. But when I try it with Postman, he gets i...
asked by 02.01.2019 / 22:24
1
answer

Implement unity container

I am building the architecture and I need to define the injection of dependencies. The idea is to set unity in a class library project to be able to reuse it (is this possible?) I have the following structure:    Solution.Core (I...
asked by 30.01.2016 / 22:28
0
answers

Error cunsumir a WEB API, HTTP POST

I have a problem when consuming an api that I hosted on my IIS server, that is the api, it is a POST method, where it receives two parameters [Route("api/Documentos/session")] [HttpPost] public String session(string username, s...
asked by 30.11.2018 / 20:19
0
answers

Return of APIREST takes too long

I have problems with calls to the database that take a long time for the millions of records that exist. But when I return a list from the webApi, I am delayed, as in the image, for example. Azul- Api Returns the listing Yellow- UI receive...
asked by 07.12.2018 / 13:45
0
answers

how to consume web api by mvc in a synchronic way?

I need to consume a web api through an mvc project synchronously, however most of the examples are asynchronous, I have the following code: [HttpGet] public async Task<ActionResult> Buscar(int? id) { //Get...
asked by 24.10.2018 / 21:20
0
answers

Response for preflight does not have HTTP ok status. Angular REST API 5

I have an application in Angular 4 that consumes a service in ASP .Net Core and there is no problem. This same application also consumes data from another service but this is in ASP .Net is a REST API, This is the code of my Service [Ht...
asked by 20.10.2018 / 00:29