Tagged Questions
0
votes
0answers
18 views
Azure WebAPI deployment sometimes yields 404s?
Components Involved
Azure free web site
My project:
plain html files
some javascript
one webapi controller that sends an e-mail via SendGrid
Github deployments
The Problem
Sometimes when I ...
1
vote
1answer
30 views
Knockout.js validation using extenders - prevent validation on load
I have implemented a very basic required validation on "first name" largely based on the example suggested on knockout website (http://knockoutjs.com/documentation/extenders.html) - Live example 2: ...
-1
votes
1answer
29 views
Pivot json data from array of models
I host a web api service, which returns a snapshot of my model "myModel" for the last 12 months. The json array that I receive on my client is a simple array of 12 "myMydel" objects.
If myModel has ...
0
votes
1answer
42 views
KO Single page app. Async data calls randomly failing/not binding
I've got a single screen with multiple dropdowns. Each get populated via a web api call.
I'm in an active directory environment. I'm using the Durandal SPA framework.
At the moment I do the loading ...
0
votes
1answer
12 views
breezejs: populate the error property of SaveResult
Currently when calling SaveChanges on the webapi controller, if a business rules is not satifisfied, we throw an exception with the error message.
It's bad practice and instead we should return with ...
0
votes
2answers
25 views
Url has ?_=*Number* after each GET call?
I have been setting up a mvc project with a webapi. I have it working but I do not know why my GET calls have additional pieces to their URL's.
Example:
/api/User/Zholen?_=1373490280823
Can someone ...
1
vote
1answer
54 views
REST javascript client
Are there any best practices for javascript REST clients. Specifically, I would like to know
how to follow links.
Let say I have a Task class
public class Task
{
public long TaskId { get; set; }
...
0
votes
3answers
50 views
Flags enum and JSON in JavaScript
I have many C# enums, and some of them have flags enabled. For example:
[Flags]
public enum MyEnum
{
item1 = 0x0000,
item2 = 0x0008
}
I cloned this into JavaScript with something like this:
...
0
votes
3answers
44 views
Persisting a security token between calls
We are creating a prototype application as follows:
We have a html web site using knockoutjs
Using qQuery/Ajax it communicates with Web Api services
We only want the services to be accessed by ...
1
vote
1answer
53 views
webapi won't deserialize string array using $.param
I am trying to call a ASP.NET WebAPI method and pass it a serialized JavaScript object over a GET request similar to a $.ajax POST request. It is working fine except for when the JavaScript object has ...
0
votes
1answer
78 views
Send data from android to web api service
I have a problem in my android Background service. While send the data using http protocol it shows ClientProtocolException
My WebAPI is
[AcceptVerbs("GET", "POST")]
...
1
vote
0answers
226 views
Web API: Upload files via Ajax post
I have this following snippet for uploading files via Ajax post (using Knockout js library)
ko.bindingHandlers.fileUpload = {
init: function (element, valueAccessor) {
$(element).after('<div ...
0
votes
1answer
91 views
How to handle response of a POST request in jQuery
I am trying to POST some data to my ASP.Net MVC Web API controller and trying to get it back in the response. I have the following script for the post:
$('#recordUser').click(function () {
...
2
votes
1answer
46 views
API path different from dev to test to prod. How do I avoid changing between deployments?
Using ASP.Net WebAPI and javascript/jquery.
I have the following JScript code:var apiUrl = "/api/myService/myMethod/
$.GetJSON(apiUrl+"/"+myValue).done(function(data){more code here});
In my dev ...
1
vote
2answers
70 views
Deserialize a JavaScript object as Dictionary<string, string> via ModelBinding in Web API
I have a simple JavaScript string and object:
var name = "Scarlett Johansson";
var args = { arg1: "foo", arg2: "bar" };
And I want to pass them via $.ajax to a Web API controller:
public string ...