ASP.NET Web API is a framework for building HTTP services for clients like browsers and mobile devices. It is based on the Microsoft .NET Framework and ideal choice for building RESTful services.

learn more… | top users | synonyms

0
votes
0answers
6 views

WebAPI v2 - JSON Serialization for OData expand causes $type to be incorrect

I have just updated an MVC4/WebApi v1 application to MVC5 + WebAPI2.. Seems like after this upgrade the Json.Net serializer will no longer include the proper $type for requests that make use of ...
0
votes
1answer
12 views

How to host web api in Godaddy

I have a shared hosting plan in Godaddy. I have a domain and I have pointed it to a directory in the FTP I got along with the hosting account. I have created a web API project and now I would like to ...
0
votes
1answer
12 views

Claims-based auth in a SaaS app with Users many-2-many to Tenants

I'm building a multi-tenant SaaS system where a user in the system is an entity independent of a Tenant entity. IE: Customer 1 can have users User1, User2 associated with it with certain roles and ...
0
votes
0answers
11 views

Remove Cookie from WebApi to Web Service Request

I have a WebApi (v2) which calls another web service. The other web service (which is out of my control) sends a Set-Cookie header in the login response. Of course, after this, every time I make a ...
0
votes
1answer
14 views

How to to invoke an @DELETE web service in REST using ajax call?

I am working on web api project wherein I have to write method to delete an account. I have created a controller called RemoveAccount where I have written my Delete account method. Following is the ...
0
votes
0answers
9 views

Persistent OAuth login in SPA with either Implicit Grant and Password Grant

I am writing a spa app where I am in control of the client (spa) and the authorization server (webapi). Of the four flows that oauth supports, the two that as far as I know make sense in the context ...
0
votes
0answers
21 views

Ninject WebApi Issue within MVC App

I currently have a working MVC 5 application which uses Ninject for dependency injection. I am now taksed with adding some Web API controllers to this project, and I want to use dependency injection ...
0
votes
0answers
10 views

Does marking a WebApi action with Obsolete have any effect other than within Intellisense?

We are currently experiencing an issue with our webapi implementation where an action returns a 404 in the QA environment. The code has moved through Dev and Int(egration) environments without fault. ...
0
votes
1answer
25 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 ...
0
votes
0answers
15 views

WebAPI HTTP response 413 (Request Entity Too Large) using Visual Studio Development Server

I've seen a lot of questions and answers to this error related to WCF bindings. I'm getting this error using a PUT operation on a WebAPI method in development that's hosted using the built-in Visual ...
-2
votes
1answer
16 views

How do i upload multiple pictures to asp.net web api with angular?

I need to upload multiple photos to my web api that looks like: Post([FromBody]CarPostViewModel value) the view model: public class CarPostViewModel { public string Name { get; set; } ...
0
votes
0answers
10 views

What can I use instead of View(“ViewName”, model) in my WebAPI controller class to get the same output

I have an MVC application in which I'm currently working with MVC WebAPI (which derives from ApiController). I had used the following code snippet in controller class which is derived from ...
0
votes
0answers
6 views

Sharing the session from MVC web project across a related WebAPI project

I am working on an MVC web application where I check that the session username exists using the following code: if (HttpContext.Current.Session["userName"] == null || ...
0
votes
0answers
10 views

Web API with multiple controllers

My project has a asp.net web api with multiple controllers.Each controller has multiple get methods. Can any one help me with an example of how to access these controllers and their various methods on ...
1
vote
1answer
35 views

Timeout a Web Api request?

Like MVC WebApi runs on the asynchronous ASP.NET pipeline, meaning execution timeout is unsupported. In MVC I use the [AsyncTimeout] filter, WebApi doesn't have this. So how do I timeout a request in ...
0
votes
1answer
8 views

WebApi unit testing the urlhelper is now null

I have some unit tests that test the post in a WebApi project it was a WebApi 1.0 version, that I have upgraded to webapi 2.0, now when trying to construct the response, and add the location of the ...
1
vote
0answers
10 views

Web API Bearer tokens - can I use custom tokens?

I'm securing a Web API site, and I want to use tokens. But, I'm working with a legacy database, where there is a users table and each user already has a token created for them and stored in the table. ...
0
votes
0answers
10 views

Publish WebAPI program on IIS with two libraries

I would like to publish a project on my local IIS Express. The project is made of a WebAPI program and of two libraries that I've created. It looks like that: The namespace "ApplicationLibrary" and ...
0
votes
0answers
11 views

ASP.NET OData v3 vs Excel 2013: ignoring pagination?

I'm trying to integrate an OData Web Api with Excel 2013 but I'm facing some troubles Scenario: Large database view with ~40 millions rows (MySQL) Database-first EDMX on top of it (Entity Framework ...
0
votes
1answer
8 views

Web API Form - Url Encoded Complex Parameter

Deserializing a complex type in WebAPI is giving me serious grief. The data contains keys that are syntactically invalid in c# as property names. How can I translate the key names? Relevant: Web API ...
0
votes
2answers
20 views

FIltering data in entity using two other entities

I have following three data tables: public partial class category { public category() { this.subcategory = new HashSet<subcategory>(); } public int category_id { get; ...
0
votes
0answers
8 views

Hybrid Authentication with asp.net Identity and Android Authorization

I'm doing a website in asp that uses Identity (v2.0) and also an Android app connected to the web site through Web API. I've configured Identity to use Google OAuth signins and works quite well. ...
0
votes
0answers
13 views

Load web api controller dynamically

I run web api with owin hosting. In my OwinHost project I do this: public class CustomResolver : DefaultAssembliesResolver { public override ICollection<Assembly> GetAssemblies() ...
0
votes
2answers
30 views

WebAPI not serializing inherited class on POST?

Here is my controller method: [System.Web.Http.HttpPost] [System.Web.Http.Route("api/exercise")] public HttpResponseMessage CreateExercise(ExerciseDto exercise) { Here are my classes: ...
1
vote
2answers
40 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 ...
3
votes
1answer
40 views

ASP.NET Web API Handles Two Integers Differently

I have a model in my Web API project that accepts two integers: public int ParentId { get; set; } public int ChildId { get; set; } While testing the API, I tested sending crazy big numbers (like ...
0
votes
1answer
10 views

Enrich ASP.Net bearer token format

I have setup an ASP.NET WebApi project with support of bearer token like this: var oAuthServerOptions = new OAuthAuthorizationServerOptions { AllowInsecureHttp = true, TokenEndpointPath = new ...
0
votes
2answers
18 views

Can't access local to Web Api from AngularJS

I've build Web Api and inside the project included a web site built with AngularJS. When I start the project it points to my web site and opens it. In AngularJS controllers I call methods from the web ...
1
vote
1answer
25 views

HttpPost for Action (save) ends in 404-error

I have a C# Website and Web API combined. In the Web API part I have four Controllers (for Products, Categories, Users and Orders). The normal GetAllProducts, GetProduct, etc. that MVC API Controller ...
0
votes
0answers
27 views

WebApi cannot get PUT to work

Im testing a webapi web service on my local machine. I cant get my PUT to work. I have the following response from the service: HTTP/1.1 405 Method Not Allowed Cache-Control: no-cache Pragma: ...
0
votes
1answer
21 views

Exception Fetching db data in WEBAPI controller in asp.net

I am trying to return some data to client page using webAPI. Please see below the exception am currently seeing while trying to access the api/controller from a browser StackTrace ...
-1
votes
0answers
39 views

two way communication in .net C# mvc

I have to create one webapi so that that can be accessed from any where. Second thing that is to be developed is web site which contains reference of above web api. Third thing is to develop is ...
0
votes
1answer
25 views

How can I add a Dependency that can be used as type parameter 'TImpl' for Castle Windsor?

I was getting this runtime exception with a particular URL: "Missing dependency. Component NRBQ.Web.Controllers.DeliveryController has a dependency on ...
0
votes
2answers
21 views

Binding values to HTML dropdownlist using JQuery with ASP.NET MVC WebAPI - Cannot read property '0' of undefined

I am trying to populate values for html drowpdown using JQuery from webapi url. JSON returns value and I've verified it using alert function. But, when I bind those into dropdown it is not populating ...
0
votes
0answers
41 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
1answer
38 views

Exposing EF6 model subsets via WebAPI

For example, I have a EF6 model like this: class User { public int Id { get; set; } public string Email { get; set; } public string Name { get; set; } public virtual ...
0
votes
1answer
35 views

Post and Get request method issue

I am currently having issues with getting both request to work together. When I use [FromUri], I am unable to filter POST request in fiddler but I am able to call GET request in any browser. But ...
0
votes
1answer
20 views

ASP.NET Web API v.1 for .NET Framework 4

Is there ASP.NET WebApi v.1? All info that I found was about ASP.NET WebApi v.2. But it is not compatible with Visual Studio 2010 and .NET Framework 4. May be there are some alternative Web API ...
0
votes
1answer
14 views

How to receive multiple complex objects using HTTp POST method in WebAp

I want to call an WebApi Method,this is how my webapi method looks like: [HttpPost] [Route("PostMyService/updatedBy/{updatedByID}/myobjname")] public void ...
0
votes
1answer
10 views

Support for $links on a typeless web api odata v3 implementation

I'm implementing a typeless entity on web api odata. I'm having trouble implementing the $links. Entity(Id)/$links/AnotherEntity I think the odata.id property that is produced when using the ...
0
votes
0answers
8 views

Asp.net Web api 2 Facebook login

I'm trying to authenticate a user via Facebook for my web api. I am able to authenticate the user when I specify the returnurl parameter to the base of the web site. My site layout is the following ...
0
votes
0answers
16 views

Extjs + Webapi + Custom authentification

I need your help about a problem with the use of formauthentification. I develop a custom authentification Webapi FormsAuthentication.SetAuthCookie(model.UserName, model.RememberMe) So in extjs ...
0
votes
1answer
18 views

How to serve utility data in Odata?

I want to have a UtilityController with some utility methods to serve data in Odata Api in Microsoft Asp.NET. Currently if I want implement a controller its based on some entity like for Product I ...
0
votes
1answer
51 views

Linq Contains show all the results in Asp.net Wep api

I got some issues in Asp.net Web Api. here is my Linq statement and used it for autocomplete. (from usr in UserProfile where usr.MobileNo.Contains('973') select usr).ToList(); Inside my UserProfile ...
0
votes
2answers
19 views

Why call ASP.NET WebAPI package libraries with version 5.1.0 as ASP.NET WebAPI 2.1?

I want to get started with ASP.NET MVC and WebAPI that was released in Jan 2014. ASP.NET MVC 5.1, ASP.NET Web API 2.1 and ASP.NET Web Pages 3.1 (Ref: NuGet) I created a new ASP.NET Web application ...
0
votes
0answers
40 views

WebAPI controllers with JSON and multipart file

I have an existing WebAPI Controller method like this: [Route("~/myFeed/")] [HttpPost] public async Task<MyFeedViewModel> AddToFeed(MyAddFeedFormModel newMyFeedModel) I submit data ...
0
votes
1answer
26 views

webapi 2 key delta patch update

Using le framework here http://blog.longle.net/2014/03/04/harness-the-power-of-asp-net-mvc-web-api-odata-kendo-ui-requirejs-to-build-an-easy-maintainable-spa-for-the-net-developer-published/ and ...
0
votes
1answer
33 views

Do I need oauth for access token based authentication

I have a Single Page Application for non-/mobile html5 browsers getting data from a RESTful HTTP API with asp.net web api. We use OWIN self hosting running in a windows service. I do not want cookie ...
0
votes
0answers
34 views

angularjs & web-api, Nested REST call using $resource [on hold]

How do I make a restful service which depends on a current object? For example: I have a specific user( with user id) and I want to interact with his comments. I want a comment service which ...
0
votes
2answers
37 views

The requested resource does not support http method 'OPTIONS'.?

I am making the following request to an asp.net web api PUT method from my angular.js client: var org = { OrgId: 111, name: 'testing testing' }; ...