Most voted "asp.net-web-api" questions
ASP.NET Web API is a framework for building HTTP services for clients such as browsers and mobile devices. It is based on Microsoft. NET Framework and ideal choice for Restful services.
Learn more…455 questions
Sort by count of
-
0
votes3
answers1247
viewsService does not execute controller method
This message I get in the browser or Postman "Message": "No HTTP resources matching URI of request 'http://localhost:9078/api/items/1000012105'.", "Messagedetail": "No action found in 'Items'…
-
0
votes3
answers39
viewsCast error while running the Rest service
I’m making that mistake: The 'Qtde' Property on 'Itenslib' could not be set to a 'System.Double' value. You must set this Property to a non-null value of type 'System.Single'. What can cause it?…
-
0
votes1
answer85
viewsDoubt with Rest service and with put verb
I just need to update two fields of my model. At get I pass a DTO to my App. The question is: When I go to do my update(put verb) do I need to load all the property or just the one I will update?…
-
0
votes1
answer233
viewsUploading files (images) in ASP.net does not send the image
I can’t send images (banners) in my Asp.net application My controller : [HttpPost] [ValidateAntiForgeryToken] [ValidateInput(false)] public ActionResult Save([Bind(Include =…
-
0
votes0
answers94
viewsSend form with file using ajax web api Entity framework
I’m trying to send a file along with the form to the database, but when I send it returns me error 400 bad request, I don’t understand why. Curriculoscontroller // POST: api/Curriculos…
-
0
votes1
answer1557
viewsSend parameters to Restfull services
I have a web application mvc and in it I have an action that should pass a parameter to a REST service. How do I pass a parameter to a REST service. I know that I will have to implement an Httppost,…
-
0
votes1
answer41
viewsapi result different from my site result
I created a C# API in Azure where it returns me an array by passing the following parameters:…
-
0
votes1
answer40
viewsReal type fields in bank with problems loading Model
About 3 or 4 months ago I had this same problem, which after I remade all my Model, solved it. And now it’s back to the same problem. Before it was with the float and now with the guy Royal. In my…
-
0
votes0
answers84
viewsSend information to Rest and trigger notification
I’m in doubt in the construction of a REST, not well in construction, but which way to go, what approach. See my business. 1) The customer asks for a discount. 2) As the seller is not allowed to…
-
0
votes2
answers47
viewsI can’t email my Webapi
I’m trying to create a function in my Webapi where I return information based on the email address I send, the problem is that the character "." breaks the route. In case I did my action like this:…
asp.net-web-apiasked 6 years, 11 months ago Vagner Santos 31 -
0
votes1
answer879
viewsHttpwebrequest Asp.net returning 400 error
I’m making an appointment at a api to receive a token access, using the Postman, the options Body and Raw, passing the access data in the body, everything works fine, but in my example I have the…
-
0
votes2
answers438
viewsApi with Item Array does not receive the posted data
I have an Api that receives the posted data as it shows the image, it turns out the data is coming empty, I appreciate the help.…
-
0
votes0
answers29
viewsError generate table data
My front does not take the data to list. However the data is entered perfectly. How to solve? <?php require_once 'vendor/autoload.php'; $app = new \Slim\Slim(); $db = new…
-
0
votes1
answer364
viewsProblems with Findsystemtimezonebyid in Web.API . NET Core in Docker (Linux)
Setting: I am migrating a Webapi to . NET Core, on Windows is running normally. Problem When I am running on Docker (Linux) (Docker-Compose) I am having the following problem: "The time zone ID 'W.…
-
0
votes1
answer506
viewsWebservice REST with authentication [ID, CPF, User, Password]
Hello, I’ve been searching the web for a while but I can’t find clear answers.. I want to implement a webservice Rest, with tokens and etc for security, and the webservice consists of only GET for…
-
0
votes0
answers510
viewsConsume API Rest in C# by Ajax in jquery
Hello I have a C# API that Returns a JSON object Follows the code [HttpGet] public string Login(string Pass, string User) { Return ret = new Return(); try { UsuarioDAL DAL = new UsuarioDAL(); var…
-
0
votes1
answer1150
viewsTurn Httpresponsemessage return to JSON
My API currently returns database values in JSON. If no value is found, I return one HttpResponseMessage with error code 404. However, when testing the request, only the message contained in Content…
-
0
votes1
answer73
viewsService being null in controller
When performing a post for my controller, when debugging, I saw that the service I load in my constructor, is coming type null. Controller: public class UserController : ApiController { private…
-
0
votes1
answer68
viewsDoes not display data on the Web Api Asp.net mvc screen
I started studying a bit of web api using Asp.net, I’m doing a very simple example where I just want to list the data from the employee table, but I get error: No Mediatypeformatter is available to…
-
0
votes1
answer62
viewsCreate objects after external server response via API
Here’s the thing, I created a php API that generates a Json. THE LINK IS THIS for those who want to view. I was able to access the link and rescue the information, because I used a Toast to show…
-
0
votes0
answers203
viewsAsynchronous handler completed while asynchronous operation was pending - C#
Hello, I have some questions regarding the code below. The return code the following error [Invalidoperationexception]: Asynchronous module or manipulator completed while asynchronous operation was…
-
0
votes1
answer105
viewsAPI WEB error with flask
I started my WEB API study trying to create a Pokedex API, When I tried to create the function of searching for Pokemon by number the following error appeared: "json.decoder.Jsondecodeerror:…
-
0
votes0
answers65
viewsHow and where to call the method of creating a Token in the Webapi to perform the validation of my user?
Good night! I’m doing a user authentication using HMACSHA512, but I’m having a hard time calling the authentication method at project start and in my controller (I’m using .NET). I did it in . NET…
-
0
votes1
answer699
viewsSend Json from client application and receive on Server
I have a problem sending a json from my client application to my server API. Json is generated correctly, and the POST request is made, but on the server side the following error is reported:…
-
0
votes2
answers173
viewsC# - Filter Include - Context
In the method below, I return some records of my entity Consultintramexrules, where it has relation with the . INCLUDE ("Emails and Parameters"). Aware that EF does not allow filtering in . INCLUDE,…
-
0
votes0
answers208
viewsWeb api c# relationship between tables
I’m trying to make the relationship between two classes "Tables". I am mounting an API for MVC5 EF6 in Visual Studio however I need information from one class to appear in the other. public class…
-
0
votes1
answer189
viewsHow to Replace XML C#
I have a method that receives some parameters, I would like to replace some xml information, at the moment I can only remove and add new information private void CriacaoDoConfirmarLogin(string…
-
0
votes1
answer777
viewsPost method is not running on Postman
Creating a method POST and testing by Postman, I can’t access the Controller that POST. I haven’t implemented much yet, but I should stop at Break if, of course, it was working. Controller…
-
0
votes0
answers493
viewsMicroservices architecture authentication with C#
How to make a user authentication using the default API Gateway? I’ve read several articles but can’t find an example of code using Web API 2 and those I’ve seen using the Asp net core only makes…
-
0
votes0
answers41
viewsASP.NET Core - Search by daughter entities
I need to implement an API that receives parameters for daughter entities Example: api/Orders/5/Products or api/Orders/5/Products/10. I need to pick up only the products of order number 5 or still,…
-
0
votes0
answers53
viewsAPI web infrastructure
I am building an API infrastructure layout and would like to see your opinions, as well as scalability ideas and concepts applied. I won’t go into too much detail of internal infrastructure,…
-
0
votes0
answers337
viewsInner Join problems on Dapper
I have the following problem, when I make a Inner Join in 3 tables the Dapper does not bring me all the columns of the 3 tables but only the one of my father table Inner Join ( or is the first table…
-
0
votes1
answer132
viewsDecimal field displays a . 0 on the screen
I have a CPF field that is decimal(11). Well, when I show on the grid the CPF it looks like this: 12345678911.0, as I can remove the . 0? My Viewmodel public class FuncionarioViewModel { [Key]…
-
0
votes1
answer61
viewsExtraction of different data from two object lists
I am working on a WEB API and need to remove some values contained in one list and which are contained in another. To be better illustrated would be the equivalent of removing the data from a list…
-
0
votes0
answers743
viewsWEB API 2 works on the localhost but not on the server
I’m starting with .NET Web Api 2 using .Net Core. In the Postman when I make the request on the localhost of my Webapi machine returns me a status 200 ok, but when I do on the server with the same…
-
0
votes2
answers62
viewsRequest API not working on 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() { }…
-
0
votes1
answer2001
viewsObject cannot be converted to dbnull in other types
Good afternoon gentlemen. I am making a user registration in the college work and when logging in this error appears. How can I solve? private Usuario Mapear(DataRow registro) { var usuario = new…
-
0
votes2
answers107
viewsProblem with C#Threadstatic
I own a system where his authentication keeps a token in a Threadstatic property. It turns out that Monday, he started distributing the tokens incorrectly (after windows server update). I made the…
-
0
votes1
answer480
viewsAsp.Net Core Webapi Returning Object List
I am trying to return a list of a "Plan" Template that has a list of "Expenses", returning only the plan list works, but when added to return the spending list of a javascript error. "Failed to load…
-
0
votes0
answers123
viewsDependency Injection - Web Api
Good Afternoon, I’m trying to create the dependency injection in the Web Api, but I’m not getting it, I get the following error: SimpleInjector.DiagnosticVerificationException Hresult=0x80131500…
-
0
votes0
answers48
viewsReact and Web API - How to submit form with files
I’m using React for front development and c# Web API for back. I am trying to submit a form that has an input file, in the API I created a Viewmodel to receive this data. Before submitting, I place…
-
0
votes1
answer105
viewsUpdate Role of the ASP.NET Identity user
hello guys I am finding it difficult to update the user role when updating my data, my roles are being filled by a Viewbag in my get from my controller and I am retrieving the new ID from my…
c# asp.net-mvc asp.net-mvc-5 asp.net-web-api asp.net-coreasked 5 years, 11 months ago Thiago Ubiratan 353 -
0
votes1
answer33
viewsCreating/changing entities in batch
I’m reading a book from Angular 5 + Asp.NET Core 2.0 (although I’m using Angular 7 and Asp.NET Core 2.1), and I’m trying to do the system that this book teaches me to do. It is a quiz system, where…
-
0
votes0
answers462
viewsConsuming C# Web Api with Reactjs
I am trying to consume a Webapi created in C# webApi2 in an application created in reactJs, when I request the Api using the browser or Postman I have the information returned, but when I try to do…
-
0
votes1
answer98
viewsProblem with accentuated character in the return of the query
I have a Mysql database with encoding defined as latin1_swedish_ci. I’m using Dapper to connect the database. When I make a query to certain tables, the characters that are accented comes as follows…
-
0
votes1
answer235
viewsWeb Api does not return related data
I’m doing some tests with Web Api (Asp.net core). And with Eager Loading I’m trying to upload a related list, but what I get from Postman is this:…
c# asp.net web-service asp.net-web-api asp.net-coreasked 5 years, 9 months ago Márcio Sebastião 769 -
0
votes0
answers46
viewsWeb Api - Is it wrong to get a related object like this?
I started developing with Web Api (Asp.net Core) and I have a doubt about this right or wrong what I am doing... I have two classes in 1 to N: The Department class: public class Department { public…
c# web-service asp.net-web-api asp.net-core asp.net-core-web-apiasked 5 years, 8 months ago Márcio Sebastião 769 -
0
votes0
answers33
viewsHow to send an Android post to Asp.net Core?
I have an application in Asp.net Core that should receive a Post via android and I’m not getting. There is always an error on android that the page was not found. class of the object in the Asp that…
-
0
votes1
answer634
viewsWeb API ASP.NET published on IIS does not work
I have an ASP.NET Web API project that I integrate with Spring 10. I followed the examples that are in Github and also the part of Assembly Resolver. When I run the project on IIS Express through…
-
0
votes0
answers83
viewsGetting null using external api with restsharp
I am facing a problem when trying to get an external API that returns Json. Instead of storing the value of json variables in the model is receiving null. Model: namespace bitcoin.Models { public…