vb System.Web.ApplicationServices.AuthenticatingEventArgs.AuthenticationIsComplete类(方法)实例源码

下面列出了vb System.Web.ApplicationServices.AuthenticatingEventArgs.AuthenticationIsComplete 类(方法)源码代码实例,从而了解它的用法。

作者:VB.NET开发    项目:System.Web.ApplicationService   
Sub AuthenticationService_Authenticating _
   (ByVal sender As Object, _
    ByVal e As System.Web.ApplicationServices.AuthenticatingEventArgs)
    
    If (e.Username.IndexOf("@contoso.com") >= 0) Then
        e.Authenticated = Membership.Providers("ContosoSqlProvider").ValidateUser(e.Username, e.Password)
    ElseIf (e.Username.IndexOf("@fabrikam.com") >= 0) Then
        e.Authenticated = Membership.Providers("FabrikamSqlProvider").ValidateUser(e.Username, e.Password)
    Else
        e.Authenticated = Membership.Provider.ValidateUser(e.Username, e.Password)
    End If
    e.AuthenticationIsComplete = True
End Sub


问题


面经


文章

微信
公众号

扫码关注公众号