• ASP.NET Auto Logon

    Looking for how to auto logon a user into your web app? Try using this snip-it of code.

    FormsAuthentication.SetAuthCookie("usernamehere", True)

    I will work on a sample application to demonstrate how you can use this. Note that you can use this to login a user, that is not actualy registered with your application. You may want to run some kind of verification. Also, the best place to use this is in the “Login.aspx” file, given your using the .NET Login/Membership class.

    Be Sociable, Share!

    Category: VB.NET, Windows | Tags: