public App() { this.Startup += this.Application_Startup; this.Exit += this.Application_Exit; this.UnhandledException += this.Application_UnhandledException; InitializeComponent(); setAuthenticationContext(); } private void setAuthenticationContext() { var webcontext = new WebContext { Authentication = new FormsAuthentication() }; this.ApplicationLifetimeObjects.Add(webcontext); }
System.Web
Visual Studio
Project->Add reference...
new WebContext
var webcontext = new WebContext() { Authentication = new FormsAuthentication() };
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)