How to: Enable Custom User Authentication (Visual Basic)
Note
This topic applies only to Visual Basic projects.
Windows-based applications in Visual Basic use Windows authentication to identify the currently logged-on user. This information can be retrieved at run time using the My.User object. For information on programming with the My.User object, see Accessing User Data (Visual Basic). In such cases, set the Authentication mode to Windows authentication.
In some situations, you may want to write your own code to authenticate users, rather than using the default Windows authentication methods. In such cases, set the Authentication mode to Application-defined authentication.
To enable custom (application-defined) authentication
With a project selected in Solution Explorer, on the Project menu, click Properties.
Click the Application tab.
From the Authentication mode drop-down list, select Application-defined authentication.
You will need to provide your own authentication code.
To use Windows authentication
With a project selected in Solution Explorer, on the Project menu, click Properties.
Click the Application tab.
From the Authentication mode drop-down list, select Windows authentication.
This is the default setting.
See Also
Tasks
Walkthrough: Implementing Custom Authentication and Authorization (Visual Basic)
Concepts
Accessing User Data (Visual Basic)