Tagged Questions
58
votes
10answers
14k views
JSONP with ASP.NET Web API
I am working on creating a new set of services in ASP.MVC MVC 4 using the Web API. So far, it's great. I have created the service and gotten it to work, and now I am trying to consume it using ...
52
votes
2answers
11k views
ASP.NET Web API Authentication
I'm really depressed by googling a lot on Web API authentication. I need to know how to authenticate a user from a client application while using ASP.NET Web API. I have seen all the videos on its ...
45
votes
2answers
1k views
How could I make my RavenDB application execute properly when UseEmbeddedHttpServer is set to true using 2-tier architecture?
I used RavenDB-Embedded 2.0.2230 in my application interacted with ASP .Net Web API in different assemblies.
When I set UseEmbeddedHttpServer = true on the document store, first time I send a request ...
34
votes
4answers
14k views
Mvc 4 vs. Wcf Web Api
What are the pros and cons of using each technology?
WCF Web Api is now merged into Asp.net
Asp.net web api now supports self hosting.
I still imagine if I want to expose multiple protocol schemas ...
28
votes
2answers
9k views
How to create ASP.NET Web API Url?
In ASP.NET MVC, we have @Url.Action for actions. Is there something similar like @Url.Api which would route to /api/controller?
25
votes
5answers
12k views
Post parameter is always null
Since upgrading to RC for WebAPI I'm having some real odd issue when calling POST on my WebAPI.
I've even gone back to the basic version generated on new project. So:
public void Post(string value)
{
...
23
votes
3answers
7k views
How to add Web API to an existing ASP.NET MVC 4 Web Application project?
I wish to add an ASP.NET Web API to an ASP.NET MVC 4 Web Application project, developed in Visual Studio 2012. Which steps must I perform to add a functioning Web API to the project? I'm aware that I ...
22
votes
4answers
9k views
Whats the difference between WCF Web API and ASP.NET Web API
Ive done a bit of work in the past using WCF WebAPI and really liked a lot of its features, Im just playing with ASP.NET Web API at the moment and it seems completely different (IE completely removed ...
21
votes
6answers
12k views
Single controller with multiple GET methods in ASP.NET Web API
In WCF Web API I had a class of similar structure:
public class SomeController : ApiController
{
[WebGet(UriTemplate = "{itemSource}/Items")]
public SomeValue GetItems(CustomParam parameter) ...
20
votes
3answers
8k views
Custom method names in ASP.NET Web API
I'm converting from the WCF Web API to the new ASP.NET MVC 4 Web API. I have a UsersController, and I want to have a method named Authenticate. I see examples of how to do GetAll, GetOne, Post, and ...
20
votes
3answers
2k views
Can I install ravendb client alongside Microsoft.AspNet.WebApi.Client?
I'm trying an ASP.NET MVC4 Web API project. I'm trying to install the ravendb client through nuget. This is the error:
Attempting to resolve dependency 'NLog (= 2.0.0.2000)'.
Successfully installed ...
19
votes
4answers
7k views
ASP.NET Web API binding with ninject
I have just installed the mvc4 rc update and I am trying to build an api application with little luck.
I am using ninject but cant get my controllers to load. I keep getting an error
Type ...
19
votes
3answers
11k views
How To Accept a File POST - ASP.Net MVC 4 WebAPI
I'm using asp.net mvc 4 webapi beta to build a rest service. I need to be able to accept POSTed images/files from client applications. Is this possible using the webapi? Below is how action I am ...
17
votes
2answers
4k views
Can I access IIdentity from Web API
I'm adding some Web API services to an existing MVC application. I have a model binder for my MVC controllers to get the user object stored in a CustomIdentity. I'm trying to reproduce this for my ...
16
votes
4answers
11k views
Could not load file or assembly 'System.Net.Http, Version=2.0.0.0 in MVC4 Web API
I have a bit of a wired problem.
I developed an app with MVC 4 and the new Web API and it works fine locally.
I installed MVC4 on the server and deployed the app. Now I get the following error:
...