Skip to main content

All Questions

0 votes
1 answer
211 views

async jQuery ajax method always posting null data to API

I wanted to take advantage of async in JavaScript, but the function will simply not POST the data to the API (it's ALWAYS null, be it a simple variable or an object). I've scoured around the ...
MC9000's user avatar
  • 2,433
0 votes
2 answers
440 views

How to pass 2 variables from jquery AJAX to ASP.Net WebApi2 method?

I can write a JQuery AJAX call to a webapi2 (asp.net) controller with only 1 parameter just fine (one json object), but when attempting to send 2 parameters (a string and an integer) to a call with ...
MC9000's user avatar
  • 2,433
0 votes
1 answer
1k views

Trying to do a slightly larger than average AXIOS.post to a .NET Web API

I'm trying to do an AXIOS.post in a Vue.JS application. It seems that when I get over about 1500 characters the process fails. What I mean by fails it does not even go to the Web API. It goes ...
Bill's user avatar
  • 1,487
0 votes
1 answer
597 views

Issue with C# Web API 2 Date format in JSON

I am working on a large system that is using C# Web API 2 and Angular 12 on the front-end. Dates that are coming in via Oracle to C# are true dates in both systems (not strings). They come across in ...
Patrick's user avatar
  • 5,906
1 vote
1 answer
2k views

Web API POST not found (throws 404 on browser) but works on PostMan and Swagger

My Web API returns 404 when called from AJAX but works well on PostMan and Swagger. Post method // POST api/<controller> [HttpPost] public int Post(string url, string RData, string aid, string ...
Cyberpks's user avatar
  • 1,421
-1 votes
1 answer
120 views

webapi cors error in HttpPost method in webapi

I am using WebAPI server and javascript client. I have below code in webapi that does work [EnableCors(origins: "http://localhost:8080", headers: "*", methods: "*")] ...
Michael Groiser's user avatar
1 vote
1 answer
2k views

Unable to receive data in a Web API HttpPost method from React axios post

My Web API Post method is working fine with Swagger, but when I send a post request from my React App with axios, the data [FromBody] is null. Here is the Web API method. [HttpPost] [Route("api/...
DevLoverUmar's user avatar
  • 14.1k
1 vote
1 answer
477 views

callback url with HTTP Post not working using ui.router

There is a frontend application developed using angularjs which uses ui.router for managing the routing functionality within the frontend application. User open the URL (https://www.testsite.com) and ...
santosh kumar patro's user avatar
2 votes
0 answers
40 views

WebApi 2 with JS as FrontEnd, How to secure pages for not authorized users?

I have a WebApi 2 project where i have a Cookie Authentication API, once the user has been Authenticated he can use all other APIs, my front-end is based on jquery and js. Now i would merge the front-...
Kasper Juner's user avatar
0 votes
0 answers
356 views

React native signalr ASP .net WebApi 2 (SignalR: Fired ajax abort async = true.)

I use Signalr (react-native-signalr V1.0.6) with React-native in some mobile devices (Android), I get the below log and the code is not working. Please help me, I don't know why it doesn't work in ...
Ramin Khoshravan's user avatar
0 votes
1 answer
851 views

How to convert json file to json array object for Deserializing into C# MVC model

I need to convert a json file to match a viewmodel parameter for a WebAPI 2 post (language C#). But when it hits the API controller, the param (data from body) is null. My .json file to set up to ...
Neal Rogers's user avatar
0 votes
2 answers
380 views

Retrieve multiple recordsets from SQL in JSON format

I'm using SQL 2016 but I'm writing the JSON using Newtonsoft.Json because the wep api used to use SQL 2012. I need to pull two record sets using javascript and Axio in a Vue application. My Web API ...
Bill's user avatar
  • 1,487
0 votes
2 answers
2k views

Can't bind multiple parameters to the request's content

I have two class and basically I am trying to call two separate models with two store procedures to insert data in both table. I wrote my controller like this: [HttpPost] public IHttpActionResult ...
Raj's user avatar
  • 9
1 vote
1 answer
48 views

Internet Explorer url issue with speical characters

I have a angular application with asp.net web api2 backend. Url: https://myapp.test.com/world-news/Cura%C3%A7ao The above url works fine in Chrome, Firefox and Safari but has an issue with IE ...
santosh kumar patro's user avatar
1 vote
0 answers
281 views

How can I receive image data from Web API and set it to the src of an image tag?

I need to be able to display an image that's located on a server's local hard drive, but not in a publicly served web directory. To that end, I'm returning the image via a Web API controller. The ...
AlexeiKaramazov's user avatar

15 30 50 per page
1
2 3 4 5
14