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

1
answer

Error with Asp.NET Web.API + AngularJS

I have my method C# so [ResponseType(typeof(Categoria))] public async Task<IHttpActionResult> Post(Categoria model) { if (!ModelState.IsValid) { return BadRequest(ModelState); } if (_repositorio.InsertOrUpdate(...
asked by 18.06.2015 / 03:09
1
answer

Uploading model along with uploading files

I have a web API built with ASP.NET WebAPI, I have a model that references a URI of a file (for example representing a photo in a photo gallery, or a product in a catalog) and I need to send the data to the API. / p> As for uploading the file...
asked by 07.02.2015 / 00:21
3
answers

Use token method GET WebAPI HttpClient

My problem is this: I'm consuming a WebAPI with the PostAsJsonAsync method In this call I'm getting a Token for authentication in the ADMIN methods of an EAD platform we're working on. So far so good. When I call the ADMIN methods by s...
asked by 11.08.2015 / 16:39
1
answer

Changing the Quality of a Stream Video C #

I need to change the quality of a video that is being scanned by my Api, I'm already sending the file, now I need to change the quality of it at the time of transmission, follow my code below: var buffer = new byte[65536];...
asked by 01.09.2015 / 16:26
2
answers

Many relationships for many in RESTful service

I'm starting to work with RESTful services and I'm having doubts about many-to-many relationships. For example, suppose I have two Cliente and Fornecedor entities and that Cliente has a list of providers, the providers from...
asked by 24.07.2014 / 22:08
2
answers

Entity Framework 6 Async and .Wait () method

I have a system that is a Web Api, the control executes a class like this: public class CrawlBO { public void IniciaProcesso() { ... CarregaConfiguracaoCrawlBO carregaconfiguracaocrawlbo = new CarregaConfiguracaoCrawl...
asked by 12.06.2015 / 14:11
1
answer

ASP.NET WebForms, MVC or WebAPI? [closed]

First of all I would like to emphasize that my knowledge in web development is very small, so my question will be focused on what to use and not how to use, since the goal is to study first and then develop. I need to create a web application...
asked by 29.05.2017 / 14:53
1
answer

How to save files on separate servers by extension

I have a WEB API that receives a file via POST it follows the Controller code: public async Task<HttpResponseMessage> Post() { // Ver se POST é MultiPart? if (!Request.Content.IsMimeMultipartConten...
asked by 06.01.2017 / 18:27
1
answer

Error when running Updad-Database command

When I run the Update-Database command in the Package Manager Console, I get the following error:    Value can not be null.   Parameter name: entitySet I have only one model in the project for now public class Project { [Key]...
asked by 27.10.2017 / 15:01
1
answer

Security Attributes

A friend asked me a way to give more security in your application, to avoid a type of "url injection", ie someone manually type a "hooked" url and circumvent the system. Of course, there are several types of encryption that could help, but the i...
asked by 21.10.2015 / 20:04