Why is my ClaimsIdentity IsAuthenticated always false (for web api Authorize filter)?
In a Web API project I am overriding the normal authentication process to check tokens instead. The code looks something like this:
In a Web API project I am overriding the normal authentication process to check tokens instead. The code looks something like this:
I have an ASP.NET Core 1.0 Web API application and trying to figure out how to pass the exception message to the client if a function that my controller is calling errors out.
What is the best way to return an image with 2 parameters (x and y for resize).
For a project I am working on, one of the things we’re implementing is something that we have code for in some of my teams older ASP.NET and MVC projects – an Application_Error exception catcher that dispatches an email to the development team with the exception experience and most relevant details.
I made a console app to consume a Web API I just made. The console app code does not compile. It gives me the compilation error:
I am beginner and creating winform application. In which i have to use API for Simple CRUD operation. My client had shared API with me and asked to send data in form of JSON.
I’m new to web-api. I want to receive a HTTP POST data using web-api. The content-type is application/x-www-form-urlencoded, and the request body is like:
I’ve got a simple WebApi method like this decorated with the OData queryable attribute.
I have an attribute named Log that tries to log the content of request and response into a text file. I’ve put that over my Controller to cover all the actions. In LogAttribute I’m reading content as a string (ReadAsStringAsync) so I don’t lose request body.
This topic has been incredibly confusing for me. I am a rookie in HTTP apps but need to develop an iPhone client that consumes JSON data from somewhere. I chose Web API from MS because it seemed easy enough but when it comes to authenticating users, things get quite frustrating.