0
votes
0answers
10 views

Web API how to create comon method for exporting grid to XLS or PDF

I have my Javascript client that talks to my C# Web API application. My Javascript client have some grid to show data to the user. I'm creating an abstract javascript grid component so all my grids ...
0
votes
0answers
20 views

LDAP authentication into a Web API backend application

I'm currently developing an order management system in Angular and JavaScript with a Web API backend. I'd like to know what would the best way of integrating LDAP authentication into this application. ...
0
votes
2answers
45 views

JQuery AJAX 'post' data isn't making it through to the web api controller

I'm setting a Person() object to a couple of ko.observables and trying to pass it into my ajax call. On the other side, a web API controller its coming over as null. This is how I'm data-binding to ...
0
votes
1answer
37 views

Javascript ajax call can't hit my Web API controller page. Can't seem to get the url correct

I have a registration page that I'm trying to save the input fields to a new record in my Users table. <button class="btn-u" type="submit" onclick="submitclicked()">Register</button> ...
0
votes
0answers
34 views

Custom Validation for Web API Controller

I am creating MVC 5 Application. I have a button that when clicked goes to a WebApi Controller method. I have used the following article to create a ValidationFilter Attribute above my Web API ...
0
votes
0answers
8 views

Javascript IFrame load event when downloading file ContentDisposition = attachment

Im having trouble getting the IFrame load event triggered when download a file ContentDisposition = attachment. My server side is a C# Web API: var stream = ...
0
votes
1answer
31 views

Is using AngularJS and WebApi good for large complex systems? Questions also

We currently have an asp.net webforms web application, which needs updating in terms of look and speed. I think its time to redevelop it and was thinking about creating a webApi and change the ...
0
votes
1answer
26 views

JavaScript array undefined when returned from ASP.NET Web API, GET method

I have the current GET method in C#: public CustomObject[] GetSample(long id) { CustomObject[] arr; var topt = new TransactionOptions(); topt.IsolationLevel = ...
1
vote
0answers
54 views

Allowing only client side app to access WEB API?

I want to make a better use of javascript frameworks in combination with ASP.NET MVC and since I am exposing WEB API to js frameworks it means that I am exposing them to the end user. How can i ...
0
votes
0answers
51 views

Authorization Header is null when making jQuery Ajax request

I have went through pretty much all of the articles I can find and followed what was suggested and somehow when processing the request on server side the Authorization header is null. The back-end is ...
0
votes
1answer
34 views

Remove explicit JavaScript backslash escaping

I have been searching to solve what I expected to be not that obscure of a task, but I have not come across a working solution yet. Perhaps I am fundamentally wrong as to what I am experiencing, and ...
1
vote
2answers
45 views

Getting TypeError: Cannot set property '0' of undefined when trying to add to array

I'm trying to learn typescript. In this attempt, I am trying to get an array of numbers, from a webservice I have created, into a javascript array. I have the following Typescript class: class ...
0
votes
0answers
47 views

How to secure user name/password in JavaScript client interfacing with REST API

I am developing a RESTfull web services. This web services will serve as a Web API to the outside world to get some data from our system. So, it will be consumed by other external clients: Mobile ...
0
votes
2answers
28 views

Angularjs $resource get/post returning same result

I'm brand new to angular, so I'm probably doing things all wrong. My query is returning an array of objects like it should be. I then do a click event to test the post..it hits my web api just ...
1
vote
1answer
68 views

webapi backend with pure javascript frontend, security

So now I am pretty much sold to the idea of having pure html+js front end where all processing happens at client side browser and the backend provides all the data in JSON/xml/other format and so on. ...
0
votes
0answers
20 views

embed pdf or image file in a single tag in a web application

I am having a web api method which returns HttpResponseMessage. Content of this response could contain an image or a PDF file. Content Type of the response contains the type of whatever is getting ...
0
votes
1answer
21 views

Double request in web api service

I'm having a really weird problem with a web api service I developed. The service is called through javascript in client-side. The service can sometime takes a lot of time to process the request and ...
0
votes
1answer
25 views

Wrap javascript API?

We are looking for your input regarding architectural design of a Javascript API and a .Net (Rest) API. Background We are building an enterprise solution with several different channels (Site, App ...
0
votes
0answers
17 views

Try getting file from local self-hosted Web Api server

my task is generate file on remote (local) web host using some parameters and send it back to client at least as save file dialog now test server's action is looking like this: [HttpGet] ...
0
votes
1answer
40 views

Send 2 Dimensional Array to Web API Servcie

I have a table of strings in my web app. It's a 2 dimensional array in Javascript. I would like to send them to a C# Web API call so I can put them into a file and mail out to someone as CSV. How do ...
2
votes
1answer
888 views

Download file from a WebAPI method using angularjs

In my angularjs project, I've an anchor tag which when clicked makes a get request to a WebAPI method. Now, I want the file to be download to the user after the request is successful. How do I do ...
0
votes
1answer
43 views

JSONP response from WebAPI to Angular

I have a simple angular controller like below: angular.module('widget.controllers', []) .controller('ProductController', ['$scope','$http', function ($scope, $http) { ...
0
votes
0answers
88 views

jquery ajax call very slow - the direct url works very fast

I have a webapi service that I need to access from web app If I call the webapi url directly (e.g. /api/scrccc/32) it returns data in less then 5 sec, but when called from jquery, it takes more then ...
0
votes
2answers
64 views

Passing credentials with Ajax load to Web API

I have an MVC site that uses authentication and authorization successfully. I am trying to query an api portion of the site using jquery and the load method. I have attempted to then use ...
2
votes
1answer
37 views

How can I get Breeze to return HttpResponse 401 when the user isn't authorized for the query?

How can I know it a user is not authorized to do a Breeze query? I've added the Authorize attribute to a query of my Breeze controller: [BreezeController] public class GamesController : ...
0
votes
1answer
63 views

WebApi method is not getting posted data. What is missing?

I'm trying to implement the infamous Todo application using ASP.NET WebApi 2. Todo model: public class Todo { public int Id { get; set; } public string Title { get; set; } } WebApi Post: ...
1
vote
2answers
31 views

serializable object exclude my public property calling from client

I am working in Asp.net web api, my model class is follwoing [Serializable] public class Workspace { private string strID; public string strName; public string ID { get { ...
0
votes
1answer
68 views

Webapi authentication, using client side ouath only

Authenticate to Webapi, using oauth provider (FB etc) client side only (HTML5 /JS phone app). This is a tricky one, So I can authenticate to our webapi using a username and password, using js from a ...
0
votes
4answers
91 views

WEB API + ASP.NET trying to display data from WEB.API in json format

I have been trying to pull in information from my web API into my application. Currently i am just trying to pull in data not submit it yet. The API is working and running as a service on my system. ...
0
votes
2answers
72 views

ASP.Net WebAPI Post Method show null value

I am stucked on this problem since yesterday. I start learning knockoutjs with ASP.Net WebAPI. Everything work very well until i post the data back to the API Controller. everytime I paseed the data ...
1
vote
1answer
162 views

Pure Front end JavaScript with Web API versus MVC views with ajax

This was more a discussion for what peoples thoughts are these days on how to split a web application. I am used to creating an MVC application with all its views and controllers. I would normally ...
0
votes
3answers
75 views

Differentiate between HTTP request and Ajax request

I am currently working on ASP.NET WebApi and Angularjs WebApi have a method [System.Web.Http.AcceptVerbs("POST")] [System.Web.Http.HttpPost] public HttpResponseMessage ...
0
votes
1answer
62 views

c# error passing a string in POST from jquery to a WebAPI project method

I'm doing something seemingly easy. I have a jquery function that call a WebApi project method (c# visual studio 2013). This method accept a string in input as parameter. this is my javascript code ...
1
vote
2answers
119 views

Breeze js - how to create an entity from a JSON string and import it into the breeze cache

I am working on a mobile single page site that uses breeze js, angular js, web API, entity framework, etc. To optimize the site, I included the breeze metadata in a bundled JavaScript that contains ...
0
votes
1answer
49 views

eagerloading expand() function in angularJS

I want the eagarloading expand function of breezejs to give me simple json objects when querying breeze's asp.net web api , so that i can iterate it in my angular views. like ...
0
votes
1answer
70 views

Ajax request with custom header to other domain WebApi

I am tring to send request to other domain WebApi using JQuery Ajax method. It works without header. But when I send a Ajax request with custom header I am getting "405->Method Not Allowed" Error in ...
1
vote
1answer
360 views

WebAPI DELETE - HTTP/1.1 405 Method Not Allowed

I've been trying to get delete working and just can't seem to make it work! All GET requests seem fine, but if I try and use the delete verb I get the above error. The method itself is reachable if ...
0
votes
2answers
71 views

AngularJS $http.post simple method is not working

I tried to use Angular $http.post(url, data) method. But I am facing some problems to post correct data to server (WebAPI). I have tried follwing options but none is working. var data1 = new ...
4
votes
1answer
173 views

ajax call does not sent cookies to web api ( Very Strange issue in Web Api)

Hi this is my ajax code function GetCurrentUserId() { return $.ajax({ type: "GET", url: rootUrl + '/api/Common/CurrentDateAndUser', dataType: 'json', ...
0
votes
1answer
23 views

Backbone.js template does not inherit attributes from model

I'm trying to get a simple SPA going for testing purposes with Backbone. When I render my view, my Underscore template is not inheriting any attributes from my model. I'm going to assume that I'm ...
0
votes
0answers
43 views

how to send authentication cookie in ajax request

how to send authentication cookie in ajax request This question related to Web Security in IE VS Chrome & Firefox (bug) This is my ajax request function GetCurrentUserId() { var ccc = ...
14
votes
3answers
448 views

Web Security in IE VS Chrome & Firefox (bug)

Why is the Web Security is working differently on different browser: Details: I have two applications One is a simple HTML application and another one is an ASP.NET MVC4 WebApi application and ...
0
votes
1answer
52 views

Push Notifications with SQL Database

I recently started gathering information about push notifications with WebApi particularly from this article: ...
0
votes
1answer
130 views

JSON data not parsing correctly in C# Web API

I am currently following a tutorial online for creating a Telephone directory using Web API. Everything was working fine until I began to use javascript with knockout.js to bind my view model. Now no ...
0
votes
0answers
60 views

DataSet in Javascript

I have a c# class which looks like: class Response { public string ResponseStatus {get; set;} public DataSet Data {get; set;} } This is just an example I have few more properties in my class. ...
0
votes
2answers
114 views

Web API - Failed to load resource: the server responded with a status of 404

I am developing angular js with web api. I have this cotroller: Controller/MasterController, and thiis in my WebApi Config: HttpConfiguration config = new HttpConfiguration(); ...
0
votes
0answers
46 views

how to encode the folder path send as parameter in web api url?

I have a requirement where i need to send a folder path as part of webapi service URL. Suppose the folder path is D:\test\upload , i need to send this path as part of service URL: ...
0
votes
1answer
496 views

ASP.NET Web API - Ajax PUT - 405 Method Not Allowed (Entity Framework)

I am trying to PUT an update to a user using JSON to ASP.NET Web API via JQuery's Ajax function. I keep getting a 405 (Method not Allowed) response from the server. I have tried just about everything, ...
1
vote
1answer
185 views

WebApi 2.1 + Backbone.js 1.1.2: sync everything at once

Disclaimer: I'm a WebApi/BackBone beginner, so the question might be a bit odd since there is a lot about these components I don't really know and/or understand. It would be nice to have the ...
0
votes
1answer
25 views

Why is my JS SPA app not loading from the services URL (404)? OR Why is there a space in my generated URL containing a username? (on certain browsers)

OK - This is a complex one and I'm not sure where to start looking at it. I have a Backbone JS based site and an ASP.Net Web API based service layer which has been deployed onto the live server. The ...