Hi Everybody,
I have customized a login control myself , so the username and password and login button are put on the skin.
It works but not quite well,
every time after I stop and restart the website, the first login does not work , I have to type the username ans password and click the login button second time .
then , it works well , everybody else can login by one click.
Is there any problem in my code?
If Request.IsAuthenticated Then
If PortalSettings.HomeTabId <> -1 Then
Response.Redirect(NavigateURL(PortalSettings.HomeTabId, "Logoff"), True)
Else
Response.Redirect(NavigateURL(PortalSettings.ActiveTab.TabID, "Logoff"), True)
End If
Else
Dim loginStatus As UserLoginStatus = UserLoginStatus.LOGIN_FAILURE
'UserController.ValidateUser(PortalId, txtUsername.Text, txtPassword.Text, "DNN", "", PortalSettings.PortalName, IPAddress, loginStatus)
UserController.UserLogin(PortalId, txtUsername.Text, txtPassword.Text, "", PortalSettings.PortalName, IPAddress, loginStatus, False)
If loginStatus <> UserLoginStatus.LOGIN_FAILURE Then
Response.Redirect("http://192.168.40.104/DotNetNuke/adminpage1/adminpage11/tabid/63/Default.aspx")
Else
Response.Write("<script Language='javascript'>