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

1
answer

Create objects after external server response via API

It is the following, I created an API in php that generates a Json. LINK is this for anyone who wants to view. I was able to access the link and retrieve the information, as I used a Toast to show them. But for some reason, which I do not k...
asked by 15.03.2018 / 21:38
1
answer

.NET application C # express style NodeJS

But for a few features I'd like my project to respond to some simple HTTP Rest requests. As the project will handle COM + and other things, I will do it in C #. The issue is, I do not want to have to deal with IIS and wanted something simpler...
asked by 12.12.2017 / 20:52
1
answer

Service being loaded null in the controller

When I make a post for my controller, when debugging, I saw that the service which I load in my constructor, is coming null type. Controller: public class UserController : ApiController { private static IUserService _userService; p...
asked by 20.02.2018 / 20:01
1
answer

Real-type fields on the bank with loading problems Model

Some 3 or 4 months ago I had this same problem, that after I remapped all my Model, it solved. And now it's back to the same problem. It used to be float and now it's Real . In my Model is decimal and gives the error. I have already changed t...
asked by 09.11.2017 / 11:05
1
answer

HttpWebRequest asp.net returning error 400

I'm doing a query on a api to get a token access, using Postman , the options Body and Raw , passing the access data on the body, everything works fine, more in my example I have the error:    An exception of...
asked by 04.12.2017 / 03:34
1
answer

api azure result different from the result of my location

I created a C # API in azure where it returns an array by passing the following faces: tccapiwebservice.azurewebsites.net/api/Algoritimos/PostAlgoritimo?_funcobjetiva=5,00;3,50&_maxmin=true&_restricoes=1,5;1.1;0.0;1&_sinalres=2;2;2...
asked by 20.10.2017 / 13:22
1
answer

A timer for a service to read a table in the DB

I need to have a service read a table in the DB every 5 or 10 seconds. I do not see any other way to do that. When this table changes a certain flag, then the service pushes a message to an App. I do not know if this is the best way to automate...
asked by 29.09.2017 / 20:44
1
answer

Return type dynamic WebApi

I'm writing a WebApi method that returns the HttpResponseMessage type. I have a query that returns a dynamic type that would return the query for the data because it is different information. The return of the data ends up with an erro...
asked by 08.06.2017 / 20:41
1
answer

HOW TO MAKE A GetAsync in an ASP.NET API passing an object as a parameter?

I would like to know how to send an object as a parameter to an API made in ASP.NET and return data by it? I understand that the simple method of a Get is: HttpClient cliente = new HttpClient(); string url = "http://localhost:50501/api/val...
asked by 03.06.2017 / 01:17
1
answer

Azure - Error 401

I'm trying to make a post to insert a record into an Azure-hosted WebAPI. link I am using POSTMAN to perform the tests, passing the parameters via form-data. When testing on localhost, it works correctly. But when trying to a...
asked by 20.04.2017 / 10:36