Compartilhar via


Como: Habilitar a autenticação de usuário personalizada (Visual Basic)

ObservaçãoObservação

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 Acessando dados do usuário (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

  1. Com um projeto selecionado no Solution Explorerdiante do projeto menu, clique em Propriedades.

  2. Click the Application tab.

  3. From the Authentication mode drop-down list, select Application-defined authentication.

    You will need to provide your own authentication code.

To use Windows authentication

  1. Com um projeto selecionado no Solution Explorerdiante do projeto menu, clique em Propriedades.

  2. Click the Application tab.

  3. From the Authentication mode drop-down list, select Windows authentication.

    This is the default setting.

Consulte também

Tarefas

Demonstra Passo a passo: Implementando autenticação personalizada e autorização (Visual Basic)

Conceitos

Acessando dados do usuário (Visual Basic)

Outros recursos

Gerenciando propriedades Application