THE CODE IS GIVEN BELOW- using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Security; /* the class that contains the encrypted string*/ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Drawing; using System.Xml.Linq; namespace ConsoleApplication7 { class GUI :Form { private Label nameLabel1; private Label nameLabel2; private Button nameButton; private ComboBox nameComBox; private ComboBox nameComBox1; private List<string> nameList; private List<string> nameList...
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] ...
IDisposable pattern. Finalize - implement of finalize method in our class to release the unmanaged resources or objects. Managed objects are object that are developed in .Net . But Unmamanged resources are one which are like windows componenet . So to release the unmanaged resource Finalize should be implemented. But we cannot access the Finalize Method and this will be called by the Garbage Collector. When an object is created it will be in GENERATION1 .GC comes to play and check if some object is unused /inactive then GC will released and deallocate the memory. GC will check the object header and check to see if there is any finalize method mentioned there or not . If its there then it will be moved to Finalized Queue which is also managed by the GC.But when the GC will go and check the Finalized queue to released the memeory is not known and we have no control to it. The Finalize is implemented by using the destructor of the class.The descrutor will get converted to Finalize meth...
Comments
Post a Comment