Last post Dec 17, 2014 06:19 AM by Shawn - MSFT
Dec 16, 2014 02:02 AM|manojsitapara|LINK
I am new to web API. I have my MVC web project ready, which is using form authentication. I want to use these project APIs in my web API project. My current project is developed in .NET framework 4.0. I have read many articles on web but most of all are
referring .NET framework 4.5.
I want to develop web API using .net framework 4.0. Initially I want to start with only Authentication & Authorization. Can someone please help me how to use form authentication on web API project where I can set username, password, user role etc. so Once
user is logged in, we need not to send request every time to database to check user credential, but we can use these information from either from cookie or from token.
Can some one please help me with example or sample source code?
Again I want to develop web API in .NET framework 4.0 only
Dec 17, 2014 06:19 AM|Shawn - MSFT|LINK
Web API assumes that authentication happens in the host. For web-hosting, the host is IIS, which uses HTTP modules for authentication. You can configure your project to use any of the authentication modules built in to IIS or ASP.NET, or write your own HTTP
module to perform custom authentication.
For more information, you could refer to:
And about the Web api and the .net framework version, you could refer to the following information: