Top "Asp.net-web-api2" questions

ASP.

How to configure Web Api 2 to look for Controllers in a separate project? (just like I used to do in Web Api)

I used to place my controllers into a separate Class Library project in Mvc Web Api. I used to add …

c# asp.net-web-api asp.net-web-api2
Enabling CORS through Web.config vs WebApiConfig and Controller attributes

There seems to be two functionally different ways to enable cross-origin request sharing in Web API 2. One is to import …

asp.net-web-api asp.net-web-api2
Web API and OData- Pass Multiple Parameters

Is it possible to get OData to do the following? I would like to be able to query a REST …

c# odata asp.net-web-api2
.Net Core Model Binding JSON Post To Web API

Just started a new project using .NET Core. Added my Web API controller and related method. Using Postman I created …

c# asp.net-core asp.net-web-api2 model-binding asp.net-core-webapi
Order of execution with multiple filters in web api

I am using latest web api. I do annotate some controllers with 3 different filter attributes. 1 [Authorize] 2 [RessourceOwnerAttribute derived from AuthorizationFilterAttribute] 3 […

c# asp.net asp.net-web-api action-filter asp.net-web-api2
swagger error: Conflicting schemaIds: Duplicate schemaIds detected for types A and B

Using Web API and using swashbuckle to generate swagger documentation, I defined two different classes with the same name in …

c# asp.net-web-api asp.net-web-api2 swagger-ui swashbuckle
Web API 2, OWIN Authentication, SignOut doesn't logout

I'm doing some research for work with a view to using Bearer tokens as an authentication mechanism (i.e. AngularJS …

authentication asp.net-web-api owin asp.net-web-api2
How can I code a Created-201 response using IHttpActionResult

How can I code a Created-201 response using IHttpActionResult ? IHttpActionResult has only these options Ok List item NotFound Exception Unauthorized …

c# asp.net asp.net-web-api response asp.net-web-api2
Autofac RegisterInstance vs SingleInstance

IProductRepositoryProxy ProductDataServiceProviderInstance = new ServiceProductDataProvider(); builder.RegisterInstance(ProductDataServiceProviderInstance).As<IProductRepositoryProxy>(); VS builder.RegisterType<ServiceProductDataProvider>().As<IProductRepositoryProxy&…

c# asp.net-web-api asp.net-web-api2 autofac
Ninject error in WebAPI 2.1 - Make sure that the controller has a parameterless public constructor

I have the following packages and their dependencies installed in my WebAPI project: Ninject.Web.WebApi Ninject.Web.WebApi.OwinHost …

c# asp.net-web-api dependency-injection ninject asp.net-web-api2