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

1
answer

Error sending file through PostAsJsonAsync method in Asp.Net MVC

In my Controller of a Asp.net MVC project I get from View an image of type HttpPostedFileBase and need to send Web Api using PostAsJsonAsync : var response = await client.PostAsJsonAsync("api/image", im...
asked by 26.06.2014 / 16:03
1
answer

Request arrives null in C #

I have a request that is being made this way in angle 5. enviarEmail(titulo: TitulosCobranca, unidade: UnidadeEmpresa) { let param: any = { titulo: titulo, unidade: unidade } return this.http.post(this.UrlService + '/T...
asked by 18.05.2018 / 13:59
1
answer

How to configure IIS for its correct operation?

When I run my API through Visual Studio CTRL + F5 or F5 and open my application that consumes this API it works perfectly (both on the same network or through NAT port redirection). However when I publish, I give publishing, the API works on...
asked by 24.05.2018 / 13:57
1
answer

How to upload and download the same request using AngularJS and Web api?

I'm developing a feature that will receive a spreadsheet in .xlsx format, perform a render and return that spreadsheet with the columns added, in which case I should upload a file and success would download it. In my attempts or I can send the f...
asked by 21.07.2016 / 15:00
1
answer

Upload with ASP.NET Core json vs formdata

I'm using asp.net core webapi , initially my actions were using the [FromBody] attribute in the parameters, so I redeemed the json value sent by the front end . Now I'm implementing a screen that has upload , and I had to use formdata to sen...
asked by 01.09.2017 / 13:20
1
answer

Remove header return Owin WebApi

A simple return query to my REST service yields the following answer: { "Id": 1, "Descricao": "TIROLESA DE AÇO", "Und": "UND", "Fabrica": "STARROW", "Estoque": 9, "Preco": 0.39 }, However, querying with more than one object star...
asked by 01.08.2015 / 04:10
2
answers

Type not expected when serializing web API

I'm trying to use the Api web and getting this error when trying to serialize an array.    The type 'HT.Data.Client' with data contract name 'Client: link 'is not expected. Consider using a DataContractResolver if you are using a DataContra...
asked by 07.11.2016 / 18:31
1
answer

web APIs, REST and Object Orientation

I'm starting to study web APIs a little deeper and I was a bit in doubt with the following question: I work with ASP.NET WebAPI and therefore with object-oriented. I have in my solution a domain project containing domain types with their behavio...
asked by 01.02.2015 / 19:02
1
answer

Make a project with web Api c # return an RSS

I need to have my project in rest WEB API return RSS instead of json or XML ... would you like to see if anyone has already managed to do it?     
asked by 23.07.2014 / 01:40
2
answers

Authentication in RESTFul service

In the example below, I need to pass a login / password pair because the REST service requires Basic Authentication. So how do I pass this information in the following section? (Additional information: authentication must be made encoded in t...
asked by 08.09.2014 / 21:08