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

0
answers

Eager Loading EF Core 2.1 Load only First Level

Well, I need a lot of help! I'm having a C # WebAPI project as per PRINT below: The problem is this: I need to access the data of navigation properties created by EF Core 2.1 DBFirst, but only the first level! What is happening is that...
asked by 02.01.2019 / 19:41
0
answers

Enabling in Swagger operations already Authenticated (Net.Framework, not Asp.Net.Core)

I have a project in WebAPI in Net Framework Full (it is not ASPNET Core ), with Swagger already configured and I have already read numerous tutorials on the Internet, but nothing I did worked out. What I need is that...
asked by 10.12.2018 / 13:35
0
answers

React and Web API - How to submit form with files

I'm using React to develop the front and C # Web APIs for back. I'm trying to submit a form that has an input file, in the API I created a ViewModel to receive this data. Before submitting, I put form data in a FormData , which is being...
asked by 04.12.2018 / 14:29
1
answer

Web API - Blocking specific calls to the server

I wonder how I can block calls that are not from direct Url's allowed on the server. Or is it possible to implement some other direct validation in oauth to block accesses other than those URLs?     
asked by 03.12.2018 / 15:36
0
answers

Dependency Injection - Api Web

Good afternoon, I'm trying to create dependency injection in Web Api, but I'm not getting it, I get the following error:    SimpleInjector.DiagnosticVerificationException     HResult = 0x80131500     Message = The configuration is invalid....
asked by 14.11.2018 / 17:26
1
answer

Post with api aws

I'm trying to make a Post for a AWS service. Home I have never worked with AWS and I am studying some links and I am initially doing a connection test using this code: private static async void SignInUserAsync() { var provider =...
asked by 21.11.2018 / 11:58
2
answers

Problem with ThreadStatic from C #

I have a system where its authentication holds a token in a ThreadStatic property. It turns out that Monday, he started distributing the tokens incorrectly (after updating the windows server).    I made the application below to test the scena...
asked by 31.10.2018 / 19:22
1
answer

Problems to insert record in webapi (c #) with javascript

Good afternoon I'm having trouble inserting log into a .Net webapi using javascript. The get method is working normally, returning the webapi information inside a table. But I'm not able to enter the information in the webapi. Checking the chrom...
asked by 15.10.2018 / 20:31
2
answers

API request not working in ASP.NET Core 2.1

I'm having trouble testing my end-points with the post and asp.net core 2.1.    Controller Base public class ControladorBase : Controller { protected IMapper _Mapper; public ControladorBase() { } public ControladorBa...
asked by 28.09.2018 / 18:00
0
answers

WEB API 2 works on localhost but not on server

I'm starting with .NET Web Api 2 using .Net Core . No Postman when I make the request on the localhost of my WebApi machine it returns a status of 200 ok, but when I do it on the server with the same WebApi it returns me 4...
asked by 04.09.2018 / 15:11