Login Problem behoben am Desktop
This commit is contained in:
@@ -75,7 +75,7 @@ Partial Class Customers_Default3
|
||||
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=False)>
|
||||
Public Shared Function filltabledetails(Kennzeichen As String, Kundennr As String, CardNo As String, SDLNr As String, History As String) As FormattedList
|
||||
Dim list As List(Of String) = New List(Of String)
|
||||
Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(Integer.Parse(Kdnrtext), Kennzeichen)
|
||||
Dim list2 As List(Of VERAG_PROG_ALLGEMEIN.cSDL) = VERAG_PROG_ALLGEMEIN.cSDL.GET_LIST_WEB_LKW(Integer.Parse(Kundennr), Kennzeichen)
|
||||
Dim listdetails As New List(Of List(Of String))
|
||||
For Each l2 In list2
|
||||
If l2.KundenNr.ToString = Kundennr AndAlso l2.SDLNr.ToString = SDLNr And l2.History.ToString = History Then
|
||||
|
||||
@@ -171,8 +171,8 @@ Partial Class login_FLEX
|
||||
reqfieldvalpassw.Validate()
|
||||
If reqfieldvalpassw.IsValid = True Then
|
||||
intzahl = VERAG_VARIABLES.RandomInteger(107, Math.Pow(2, 10))
|
||||
Dim hashpw1 As Byte() = Await VERAG_VARIABLES.HashPasswordAsync(tb3_M.Text, salt, intzahliterats, intzahl)
|
||||
passw = tb3_M.Text
|
||||
Dim hashpw1 As Byte() = Await VERAG_VARIABLES.HashPasswordAsync(tb3.Text, salt, intzahliterats, intzahl)
|
||||
passw = tb3.Text
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -214,12 +214,12 @@ Partial Class login_FLEX
|
||||
VERAG_VARIABLES.seterrorcount(8)
|
||||
Login1.FailureText = VERAG_VARIABLES.geterrornumb + "Username is not in the database!"
|
||||
End If
|
||||
If String.Equals(tb3.Text, dr("Password")) = True Then
|
||||
If String.Equals(tb3.Text, dr("Password").ToString) = True Then
|
||||
intzahl = VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(95, 200), Math.Pow(2, 10))
|
||||
salt = VERAG_VARIABLES.GenerateSalt(intzahl)
|
||||
Dim hashpw As Byte() = Await VERAG_VARIABLES.HashPasswordAsync(passw, salt, intzahliterats, intzahl)
|
||||
Dim hashpw As Byte() = Await VERAG_VARIABLES.HashPasswordAsync(tb3.Text, salt, intzahliterats, intzahl)
|
||||
If Await VERAG_VARIABLES.VerifyhashAsync(dr("Password").ToString, salt, hashpw, intzahliterats, intzahl) = True Then
|
||||
passw = dr("Password").ToString
|
||||
passw = tb3.Text
|
||||
Else
|
||||
passw = String.Empty
|
||||
End If
|
||||
@@ -227,12 +227,22 @@ Partial Class login_FLEX
|
||||
VERAG_VARIABLES.seterrorcount(9)
|
||||
Login1.FailureText = VERAG_VARIABLES.geterrornumb + "Password is not in the Database!"
|
||||
End If
|
||||
If String.IsNullOrEmpty(tb2.Text) = False AndAlso String.IsNullOrEmpty(tb2_M.Text) = True And String.Equals(tb.Text, dr("KundenNr").ToString) = True AndAlso String.Equals(tb2.Text, dr("Username").ToString) = True AndAlso String.Equals(tb3.Text, dr("Password").ToString) = True Then
|
||||
FormsAuthentication.SetAuthCookie(Login1.UserName, cb.Checked)
|
||||
|
||||
'If (String.IsNullOrEmpty(passw) = False And String.IsNullOrEmpty(UserNaMe) = False And String.IsNullOrEmpty(Customer_ID) = False) Then
|
||||
'Dim str = gensaltToken(UserNaMe, passw, Customer_ID, Session.IsNewSession)
|
||||
'MsgBox(str)
|
||||
'End If
|
||||
|
||||
FormsAuthentication.RedirectFromLoginPage(UserNaMe, True)
|
||||
End If
|
||||
'MsgBox("Erfolgreich validiert.")
|
||||
Session.Add("test", UserNaMe)
|
||||
Session.Add("CustomerID", Customer_ID)
|
||||
Session.Add("PW", passw)
|
||||
Exit Select
|
||||
setDBLastLoggedIn(tb2.Text)
|
||||
'setDBLastLoggedIn(tb2.Text)
|
||||
End Select
|
||||
End If
|
||||
dr.Close()
|
||||
@@ -240,15 +250,7 @@ Partial Class login_FLEX
|
||||
End Using
|
||||
End Using
|
||||
|
||||
If String.IsNullOrEmpty(tb2_M.Text) = False AndAlso String.IsNullOrEmpty(tb2.Text) = True Then
|
||||
FormsAuthentication.SetAuthCookie(Login1.UserName, cb.Checked)
|
||||
End If
|
||||
'If (String.IsNullOrEmpty(passw) = False And String.IsNullOrEmpty(UserNaMe) = False And String.IsNullOrEmpty(Customer_ID) = False) Then
|
||||
'Dim str = gensaltToken(UserNaMe, passw, Customer_ID, Session.IsNewSession)
|
||||
'MsgBox(str)
|
||||
'End If
|
||||
|
||||
FormsAuthentication.RedirectFromLoginPage(UserNaMe, True)
|
||||
End Sub
|
||||
Protected Async Sub ValidateUser_M(sender As Object, e As EventArgs) Handles Login2.Authenticate
|
||||
Dim ConnectionString = ""
|
||||
@@ -365,9 +367,9 @@ Partial Class login_FLEX
|
||||
If String.Equals(tb3_M.Text, dr("Password")) = True Then
|
||||
intzahl = VERAG_VARIABLES.RandomInteger(VERAG_VARIABLES.RandomInteger(95, 200), 0.78 * VERAG_VARIABLES.GetCpuSpeed)
|
||||
salt = VERAG_VARIABLES.GenerateSalt(intzahl)
|
||||
Dim hashpw As Byte() = Await VERAG_VARIABLES.HashPasswordAsync(passw, salt, intzahliterats, intzahl)
|
||||
Dim hashpw As Byte() = Await VERAG_VARIABLES.HashPasswordAsync(tb3_M.Text, salt, intzahliterats, intzahl)
|
||||
If Await VERAG_VARIABLES.VerifyhashAsync(dr("Password").ToString, salt, hashpw, intzahliterats, intzahl) = True Then
|
||||
passw = dr("Password").ToString
|
||||
passw = tb3_M.Text
|
||||
Else
|
||||
passw = String.Empty
|
||||
End If
|
||||
@@ -375,7 +377,17 @@ Partial Class login_FLEX
|
||||
VERAG_VARIABLES.seterrorcount(9)
|
||||
Login2.FailureText = VERAG_VARIABLES.geterrornumb + "Password is not in the Database!"
|
||||
End If
|
||||
setDBLastLoggedIn_M(UserNaMe)
|
||||
If String.IsNullOrEmpty(tb2_M.Text) = True AndAlso String.IsNullOrEmpty(tb2.Text) = False And String.Equals(tb_M.Text, dr("KundenNr").ToString) = True AndAlso String.Equals(tb2_M.Text, dr("Username").ToString) = True AndAlso String.Equals(tb3_M.Text, dr("Password").ToString) = True Then
|
||||
FormsAuthentication.SetAuthCookie(Login2.UserName, cb.Checked)
|
||||
|
||||
'If (String.IsNullOrEmpty(passw) = False And String.IsNullOrEmpty(UserNaMe) = False And String.IsNullOrEmpty(Customer_ID) = False) Then
|
||||
'Dim str = gensaltToken(UserNaMe, passw, Customer_ID, Session.IsNewSession)
|
||||
'MsgBox(str)
|
||||
'End If
|
||||
|
||||
FormsAuthentication.RedirectFromLoginPage(UserNaMe, True)
|
||||
End If
|
||||
'setDBLastLoggedIn_M(UserNaMe)
|
||||
'MsgBox("Erfolgreich validiert.")
|
||||
Session.Add("test", UserNaMe)
|
||||
Session.Add("CustomerID", Customer_ID)
|
||||
|
||||
Reference in New Issue
Block a user