Top "Asp.net-web-api2" questions

ASP.

OWIN HttpListener not located

When I try to start : WebApp.Start<SrvcHst>(new StartOptions { Port = 9956, ServerFactory = "Microsoft.Owin.Host.HttpListener" }); I get …

c# exception .net-4.5 owin asp.net-web-api2
How to get object using Httpclient with response Ok in Web Api

my web api like public async Task<IHttpActionResult> RegisterUser(User user) { //User Implementation here return Ok(user); } I …

c# asp.net asp.net-mvc asp.net-web-api asp.net-web-api2
Migrate Global.asax to Startup.cs

For better test job with Microsoft.Owin.Testing.TestServer, I found that Global.asax is not loaded with Owin TestServer. …

c# asp.net asp.net-mvc-4 unit-testing asp.net-web-api2
How to use Swagger as Welcome Page of IAppBuilder in WebAPI

I try to use Swagger with Microsoft WebAPI 2. For the moment, I've the following call in a method. appBuilder .ConfigureOAuth() .…

c# swagger asp.net-web-api2
web api routing and http post

I'm building an API using WEB API 2. I have the following API controller: [RoutePrefix("api/account")] public class AccountController : ApiController { […

c# .net asp.net-web-api2 asp.net-web-api-routing
Get Content-Disposition parameters

How do I get Content-Disposition parameters I returned from WebAPI controller using WebClient? WebApi Controller [Route("api/mycontroller/GetFile/{fileId}")] …

c# asp.net-web-api2 webclient httpresponse content-disposition
Method not found: 'System.String System.String.Format(System.IFormatProvider, System.String, System.Object)

I have a Web API 2 project with help pages that runs fine locally but throws this error when I push …

c# asp.net azure asp.net-web-api2
OPTIONS 405 (Method Not Allowed) web api 2

I have created a web api 2 and I'm trying to do a cross domain request to it but I'm getting …

c# asp.net-mvc cors asp.net-web-api2
IHttpActionResult vs async Task<IHttpActionResult>

Most Web API 2.0 methods I've seen return IHttpActionResult, which is defined as an interface that "defines a command that asynchronously …

c# asynchronous asp.net-web-api2
Web API 2 download file using async Task<IHttpActionResult>

I need to write a method like below to return a text document (.txt, pdf, .doc, .docx etc) While there …

c# asp.net asp.net-web-api2