0
votes
0answers
8 views

Order property in System.Web.Http.AuthorizeAttribute

If I have multiple authorization attributes on an action, my understanding is that for System.Web.Mvc.AuthorizeAttribute I can specify the Order property like: [CustomAuth(Order=2)] ...
1
vote
2answers
49 views

Returning valid JSON from JSON Formatter on HTTP OK for WebAPI

I use WebAPI for various REST calls, and have always on success (when I don't need data) just used return new HttpResponseMessage(HttpStatusCode.OK); However with jQuery 1.9 having a breaking ...
0
votes
1answer
45 views

Input validation for .NET web api in Http Get request

I am developing a Restful service using .net web API. There are a few posts about input validation for the post request using model validation. However, I am wondering what is the best practice of ...
0
votes
2answers
43 views

Passing constructor arguments to injected objects in the MVC controller

I am developing a MVC application using .net, I am using autofac as the IoC container. I have service class which needs a parameter in the constructor. And the parameter is resolved at run time from ...
0
votes
1answer
42 views

Getting a web application's URI during startup

I need to find out the base URI of an ASP.NET Web API application hosted in IIS 7.5+, right after the app's startup, but before any client request may have reached it. The scenario where I need this ...
1
vote
1answer
22 views

How to set the EmitDefaultValue to false globally for all Data Members in Web API?

I'm using Web API and I've set the below property so that the default value is not displayed when members are serialized: [DataMember(EmitDefaultValue = false)] public string EventName { ...
0
votes
1answer
32 views

Accessing Route Data in DelegatingHandler using MVC 4

I just Register these routes now how can I get Apikey value in WebApiKeyHandler.cs since it is not part of query string so I am getting null. Also guide me how I am validating keys is best practice ...
1
vote
1answer
31 views

Web Api route not found

I have already researched many of the questions regarding this topic. I'm no slouch when it comes to MVC3 but for the life of me I can't figure out why my Web Api in MVC 4 routing is failing. ...
0
votes
1answer
61 views

Async service facade in .NET 4.5

I just upgraded to .NET 4.5 and I want to take advantage of the asynchronous method features. Specifically, I have a facade that makes 4 different api calls and aggregates the responses into a single ...
2
votes
1answer
58 views

Web API and queries with foreign keys

I'm playing around with Web API, and I'm struggling a bit with creating queries to pull back data based on a filter. The classic example would be pulling back a list of items based on a foreign key. ...
1
vote
2answers
56 views

Cross Site ajax request not working

Hi I need to have two standalone projects one will be an MVC project and the other an WEB API project.Both will be placed in separate solutions. My problem appears when I try to make ajax calls from ...
2
votes
2answers
86 views

For and Asp.Net MVC 4 Web Application + API + Windows Service, what is the right place to put the validation - On Model or ViewModel? [closed]

I am relatively new to MVC and trying to put together a framework for a MVC 4 based web application. This question is somewhat similar is nature to mine, but I have a particular situation that I want ...
-4
votes
0answers
22 views

What Javascript stuff i should learn for Web as my work evolves from ASP.NET MVC to ASP.NET WebAPI Javascript [closed]

What Javascript stuff i should learn for Web as my work evolves from ASP.NET MVC to ASP.NET WebAPI Javascript stuff like Backbone, Angular I am wondering why can't we use MVVM like knockout along ...
0
votes
2answers
68 views

When to use Web API and when to use Normal controller classes

I want to start implementing a new project for our company, the project is about managing our company’s assets such as server, pc, vehicles, furniture, etc. Main functionalities for the system ...
2
votes
1answer
31 views

Use a viewmodel with web api action

I just read this post by Dave Ward (http://encosia.com/using-jquery-to-post-frombody-parameters-to-web-api/), and I'm trying to throw together a simple web api controller that will accept a viewmodel, ...

1 2 3 4 5 58
15 30 50 per page