Skip to main content

All Questions

0 votes
0 answers
691 views

ASP.NET: Authorize MVC Action with Bearer Token through AJAX calls

this is my first post in SO. I have a single ASP.NET project, it uses Web API in the back end with bearer token authentication which works perfectly using PostMan. Though, I am struggling in the ...
RolandoMalena's user avatar
2 votes
3 answers
3k views

Ajax call to web api is Not Working

I'm new to Ajax,I've written my Api in get method it's return value sucessfully i've seen it on web console and also in fiddler but my ajax call to web api is not get any values at document ready ...
Santhosh's user avatar
  • 107
-1 votes
2 answers
641 views

Reading Javascript FormData value in Asp.net Web api Httpresponsemessage

I have a Web api which is decorated with [HttpPost] which is used to upload all information passed in parameter but getting this error Error Controller [HttpPost] public HttpResponseMessage ...
TAHA SULTAN TEMURI's user avatar
0 votes
0 answers
712 views

How to get HttpStatusCode.NoContent message passing throw Web API in Jquery

Web Api Code public HttpResponseMessage Get() { try { List<Customer> customerList = new List<Customer>(); TestDBContext dbconntext = new ...
Yogesh Kumar's user avatar
4 votes
2 answers
1k views

convert UTC date to local time in javascript (moment.js)

I receive the following date as JSON data from an ASP.NET webapi2 service. { creationDate: "2014-11-18T15:16:56.363" ... //other fields... } The dates in the system are stored as UTC dates, ...
Jim's user avatar
  • 16.1k
0 votes
1 answer
63 views

How to Pass object to angularjs control object to antoher angularjs controll in MVC5

I have to pass the object Angular.js control object to another Angular.js control. Control 1 // This is used for calling post methods from web API with passing parameters $scope.saveSubs = function ()...
sanjeewa's user avatar
  • 614
0 votes
3 answers
192 views

Access hard-coded data in MVC controller using Angularjs

I have some knowledge about Angularjs but I'm new to ASP.NET MVC. So I was following this https://learn.microsoft.com/en-us/aspnet/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-...
user avatar
0 votes
2 answers
596 views

Web Api 2 Login and Register Actions, JavaScript problems

Today I'm trying Web Api 2 Login and Register Actions. I'm using Standard Template from Visual Studio 2015. I created JavaScript Client on web side, but I do not see alerts and registration is not ...
Archil Labadze's user avatar
1 vote
1 answer
72 views

How to upload a document to web api with Ajax, without using html User Control or Form?

Wherever I have the UI for uploading the document, I am easily able to use FormData api for uploading asynchronously to web api. Now I have a scenario where I need to upload a document based on file ...
seUser's user avatar
  • 1,113
2 votes
4 answers
702 views

multiple routes in one controller causes 400:bad request

Let me give an example of my problem, I have registered my routes as following(RouteConfig.cs): routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: ...
Brian's user avatar
  • 71
0 votes
2 answers
43 views

Javascript issue: Array of integers recieved as a string at the Web API controller

Why i am getting a string in my web api controller when I am setting the the property as $("#ProfessionsCheckBoxes input:checked").each(function() { professionsChecked.push($(this).attr("Id")); })...
Obviously's user avatar
  • 105
0 votes
1 answer
5k views

displaying Data from multiple tables with AngularJs

I have been reading different posts with similar questions but I cannot get this figured out. I have a Job class that is linked to different tables such as Customer and Employee. The Data is coming ...
texas697's user avatar
  • 6,487
2 votes
1 answer
2k views

Post JSON and file data and from JavaScript to MVC Web API Controller

I want to upload a large file in chunks with JavaScript - i.e. using the File API to slice it, then post the slice blob to the server. I can do this like so: Javascript: // file is a file from an ...
user888734's user avatar
  • 3,907