The Authentication technique used mainly by token based with OWIN, Step was to register a user , We created a appliction form to submit the user credentials to the WEB API Post Mehtod and saved in the database . We have built a repository class which interacts with the database and gives the required result-set when requested for , We have also introduced a Business Layer which handles the business logics and acts as model for the controller . The implementations of the Authentication and Authorization is done from this site . http://bitoftech.net/2014/06/01/token-based-authentication-asp-net-web-api-2-owin-asp-net-identity/ The Controller Class using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using WebApiDemo.Models; namespace WebApiDemo.Controllers { public class EmployeeController : ApiController { [Authorize] ...
1)Can a derived class reference contain base class object. using System; public class Base { public Base() { Console.WriteLine("I am from the Base Class Constructor"); } public void Invert() { Console.WriteLine("I am an invert function and I belong to Base"); } } public class Derived:Base { public Derived() { Console.WriteLine("I am from the derived class constructor"); ...
Persisting data between different elements in MVC with View Bag, ViewData,TempData,Session Sending data betweeb controller,View to another view we use ViewData and ViewBag, Data sending from one ActionResult to another we use TempData, Data sending between view to controller we use query string,Hidden fields, Session variables of ASP.NET can also be used to get the data through out all the entities https://www.youtube.com/watch?v=yq1N7zfZTBo
Comments
Post a Comment