Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

asp.net-web-api

Why is my ClaimsIdentity IsAuthenticated always false (for web api Authorize filter)?

September 2, 2022 by Magenaut

In a Web API project I am overriding the normal authentication process to check tokens instead. The code looks something like this:

Categories ASP.NET, Q&A Tags asp.net, asp.net-4.5, asp.net-web-api, c#, claims-based-identity Leave a comment

Error handling (Sending ex.Message to the client)

September 2, 2022 by Magenaut

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.

Categories ASP.NET, Q&A Tags asp.net, asp.net-core, asp.net-core-1.0, asp.net-web-api, c# Leave a comment

Is there a recommended way to return an image using ASP.NET Web API

September 2, 2022 by Magenaut

What is the best way to return an image with 2 parameters (x and y for resize).

Categories ASP.NET, Q&A Tags asp.net, asp.net-web-api, image Leave a comment

Application_Error in global.asax not catching errors in WebAPI

September 2, 2022 by Magenaut

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.

Categories ASP.NET, Q&A Tags .net, asp.net, asp.net-web-api, c#, error-reporting Leave a comment

‘System.Net.Http.HttpContent’ does not contain a definition for ‘ReadAsAsync’ and no extension method

September 2, 2022 by Magenaut

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:

Categories ASP.NET, Q&A Tags .net, asp.net, asp.net-mvc, asp.net-web-api Leave a comment

Call and consume Web API in winform using C#.net

September 2, 2022 by Magenaut

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.

Categories ASP.NET, Q&A Tags .net, asp.net, asp.net-web-api, c#, winforms Leave a comment

ASP.NET web api cannot get application/x-www-form-urlencoded HTTP POST

September 2, 2022 by Magenaut

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:

Categories ASP.NET, Q&A Tags asp.net, asp.net-web-api, c#, json Leave a comment

Web API Queryable – how to apply AutoMapper?

September 1, 2022 by Magenaut

I’ve got a simple WebApi method like this decorated with the OData queryable attribute.

Categories ASP.NET, Q&A Tags .net, asp.net, asp.net-mvc, asp.net-web-api Leave a comment

Web Api Request Content is empty in action filter

September 1, 2022 by Magenaut

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.

Categories ASP.NET, Q&A Tags asp.net, asp.net-mvc, asp.net-web-api, c# Leave a comment

User Authentication in ASP.NET Web API

September 1, 2022 by Magenaut

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.

Categories ASP.NET, Q&A Tags asp.net, asp.net-web-api Leave a comment
Older posts
Newer posts
← Previous Page1 … Page8 Page9 Page10 … Page29 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress