Hello, please let me know if what we are following is a good practice:-
1)website is set to use windows authentication and authorization is granted to 2 users and denied to others.
2)website contains a webpage names search.aspx; on this page we have used:-
Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
Dim ss As System.Web.SessionState.HttpSessionState
ss = HttpContext.Current.Session
If ss.Item("sessionVar") Is Nothing Then
Response.Redirect("~\Account\login.aspx")
End If
End Sub
3) In login.aspx we have code as:-
Private Sub LoginUser_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles LoginUser.Authenticate
Try
Dim ObjConnector As LXLibrary.IConnect
Dim ObjUser As LXlib. ...
Go to the complete details ...