NetTalk Central

Author Topic: Alert msg not showing in the red bar since nt7  (Read 4243 times)

MikeR

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
    • Email
Alert msg not showing in the red bar since nt7
« on: December 15, 2012, 10:56:20 PM »
I get the following output from debugview:

[13836] [st] Failed to load zlibwapi.dll
[13836] [netTrace][thread=3] NetTalk WebServer - unable to compress data - zlibwapi.dll Not found
[13836] [netTrace][thread=3] ValidateForm on ChangeRecord
[13836] [netTrace][thread=3] JMR invalid password:Login Failed. Invalid User/Password Pair - Try Again.
[13836] [st] Failed to load zlibwapi.dll
[13836] [netTrace][thread=3] NetTalk WebServer - unable to compress data - zlibwapi.dll Not found

I inserted the above 'JMR' p_web._trace line using the following code in the validate:update routine after do validate:record
you will notice the JMR trace message displays but the loc:invalid and loc:alert settings dont show on the browser ?
:

  ! The HASH test prevents the same form-post from being used "twice".
  ! This improves security on public computers.
! message(p_web.GetValue('loc:hash')& '-' & p_web.GetSessionValue,('loc:hash'),'before hash')
  if p_web.GetValue('loc:hash') = p_web.GetSessionValue('loc:hash') or TRUE
    ! login checking goes here. In this example a simple 'Demo / Demo" login will work. Your app will
    ! probably need a stronger test than that.
    use3:userlogin = loc:Login
!     message('hello')
    if  Access:Users.TryFetch(use3:sk_userlogin)
        loc:Invalid = 'Loc:Login'
        p_web.SetValue('retry',p_web.site.LoginPage)
        loc:Alert = 'Login Failed. Try Again.'
        p_web.DeleteCookie('loc__login')
        p_web.DeleteCookie('loc__password')
    else
        if  use3:password not = Loc:Password
            loc:Invalid = 'Loc:Password'
            p_web.SetValue('retry',p_web.site.LoginPage)
            loc:Alert = 'Login Failed. Invalid User/Password Pair - Try Again.'
            p_web.DeleteCookie('loc__login')
            p_web.DeleteCookie('loc__password')
            p_web._trace('JMR invalid password:' loc:alert)
        else
            if  use3:activeInd not = 1
                loc:Invalid = 'Loc:Password'
                p_web.SetValue('retry',p_web.site.LoginPage)
                loc:Alert = 'Login Failed. User Expired - Big Brother is watching you.... - Try Again.?'
                p_web.DeleteCookie('loc__login')
                p_web.DeleteCookie('loc__password')
            else
                p_web.ValidateLogin()                   ! this sets the session to "logged in"
                p_web.SetSessionValue('loc:hash',0)     ! clear the hash, so this login can't get "replayed".
                p_web.ssv('XibsUser',use3:usercode)
                ! set the session level, and any other session variables based on the logged in user.
                p_web.SetSessionLevel(use3:useraccess)
                p_web.SSV('XibsUserName',use3:username)
                ! this next bit shows how the login & password can be stored in the browser
                ! so that it is "remembered" for next time
                if loc:remember = 1
                  p_web.SetCookie('loc__login',loc:login,today()+30)       ! note the expiry date. It's good
                  p_web.SetCookie('loc__password',loc:password,today()+30) ! form to make sure your cookies expire sometime.
                else
                  ! don't remember, so clear cookies in browser.
                  p_web.DeleteCookie('loc__login')
                  p_web.DeleteCookie('loc__password')
                End
            end   
        end
    end
  Else
    p_web.DeleteCookie('loc__login')
    p_web.DeleteCookie('loc__password')
  End

  ! delete the session values, so if the user comes back to the form, the items are not set.
  p_web.deletesessionvalue('loc:login')
  p_web.deletesessionvalue('loc:password')
  p_web.deletesessionvalue('loc:remember')
  p_web.deletevalue('loc:login')
  p_web.deletevalue('loc:password')
  p_web.deletevalue('loc:remember')

MikeR

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
    • Email
Re: Alert msg not showing in the red bar since nt7
« Reply #1 on: December 17, 2012, 12:42:20 AM »
Am I the only one with this problem ?

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11232
    • View Profile
Re: Alert msg not showing in the red bar since nt7
« Reply #2 on: December 17, 2012, 02:14:51 AM »
Hi Mike,

it's hard to comment without an example. Perhaps try example 3 and see if you get the same problem there?

regarding;
[13836] [st] Failed to load zlibwapi.dll

This is the compression library used by StringTheory. It doesn't hurt if it's missing, but it's faster if it's there. It's in your \3rdparty\bin folder so consider copying it to your app folder.

cheers
Bruce

MikeR

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
    • Email
Re: Alert msg not showing in the red bar since nt7
« Reply #3 on: December 17, 2012, 02:51:41 AM »
example 3 has same problem, only popup error works, no top of page red msg

osquiabro

  • Hero Member
  • *****
  • Posts: 684
    • View Profile
    • Email
Re: Alert msg not showing in the red bar since nt7
« Reply #4 on: December 17, 2012, 04:56:32 AM »
I have the same problem in version 6.51.

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11232
    • View Profile
Re: Alert msg not showing in the red bar since nt7
« Reply #5 on: December 17, 2012, 10:58:07 PM »
fixed for next build of both NT7 and NT6.

cheers
Bruce