Securing ASP.NET Web API using Custom Token Based AuthenticationProviding a security to the Web API’s is important so that we can restrict the users to access to it. We can provide the security in two different ways: Basic authentication. Token based authentication.In this blog, we will discuss how we can implement token based authentication. Below diagram shows the control flow of token based authentication.Fig: Token based authentication for Web API’s.How token based authentication...
Read More
Web API 2 With Repository patternHow to create Repository pattern in web API 2.Overview of Repository PatternThe repository pattern is intended to create an abstraction layer between the data access layer and the business logic layer of an application. It is a data access pattern that prompts a more loosely coupled approach to data access. We create the data access logic in a separate class, or set of classes called a repository with the responsibility of persisting the application's busines...
Read More
What is Asp.Net Web API?Asp.Net Web API is a framework for building HTTP services that can be consumed by a broad range of clients including browsers, mobiles, iphone and tablets. It is very similar to ASP.NET MVC since it contains the MVC features such as routing, controllers, action results, filter, model binders, IOC container or dependency injection. But it is not a part of the MVC Framework. It is a part of the core ASP.NET platform and can be used with MVC and other types of Web applicatio...
Read More