Basic HTTP authentication in ASP.NET Web API using membership provider | Development on Various Platforms |


In this blog post I am going to show how to provide Basic HTTP authentication in a Web API project by extending framework’s AuthotrizeAttribute.

ASP.NET Web API is a great tool to create lightweight, HTTP-based APIs for your internet and mobile applications. In most scenarios you will need to provide some kind of authentication and authorization mechanism to restrict and isolate resources exposed by your services. Security in ASP.NET Web API is deferred to the hosting infrastructure. When running within IIS, authorization mechanism runs on top of an existing ASP.NET security system, meaning you can leverage existing features like … good ‘ol membership and role providers.





Via William delmas