User Authentication Problem

Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default User Authentication Problem

    I've created a login page which checks the user's access level against an
    Access database. Works fine for level members 2 and 3. - 1 and 4 get denied.
    Please see the code below. Thanks in advance! ' redirect user based on
    Access level If Session('MM_UserAuthorization') = '1' Then
    MM_redirectLoginSuccess = 'WelcomeEric.asp' ElseIf
    Session('MM_UserAuthorization') = '2' Then MM_redirectLoginSuccess =
    'WelcomeTrish.asp' ElseIf Session('MM_UserAuthorization') = '3' Then
    MM_redirectLoginSuccess = 'WelcomeMyles.asp' ElseIf
    Session('MM_UserAuthorization') = '4' Then MM_redirectLoginSuccess =
    'WelcomeZvi.asp' Else MM_redirectLoginSuccess = '?Action=Failed' End If

    Eric8000 Guest

  2. Similar Questions and Discussions

    1. Problem creating a new user with form authentication enabled
      Hi I have implemented form authentication with login.aspx as the form to call if the user is not authenticated using the following in the...
    2. User Authentication
      Hi All: I would like to have certain areas of a site that I am developing password protected but I am not sure how to go about doing this. I know...
    3. XP user authentication
      Folks, Given the following function signature: bool AutheticateUser(string uid, string pwd); Can anyone tell me which .Net class.function API...
    4. SQL User authentication
      Is it possible to authenticate user using a SQL database, containing users and passwords? What I want to achive is: I have as SQL database...
    5. DB User authentication.
      Not a programmin newbie, but a PHP newbie. I'm working off the user authentication and database thing off hotscripts.com. It doesn't work, yet...
  3. #2

    Default Re: User Authentication Problem

    Eric

    Are you sure the values 1 and 4 are getting passed to the code? Try adding
    the Session('MM_UserAuthorization') to the end of the Action failed to see
    what value is passed. Something along the lines of:

    Else
    MM_redirectLoginSuccess = '?Action=Failed&UserLevel=' &
    Session('MM_UserAuthorization')
    End If

    Brendan


    "Eric8000" <webforumsuser@macromedia.com> wrote in message
    news:d0317b$4i7$1@forums.macromedia.com...
    > I've created a login page which checks the user's access level against an
    > Access database. Works fine for level members 2 and 3. - 1 and 4 get
    denied.
    > Please see the code below. Thanks in advance! ' redirect user based
    on
    > Access level If Session('MM_UserAuthorization') = '1' Then
    > MM_redirectLoginSuccess = 'WelcomeEric.asp' ElseIf
    > Session('MM_UserAuthorization') = '2' Then MM_redirectLoginSuccess =
    > 'WelcomeTrish.asp' ElseIf Session('MM_UserAuthorization') = '3' Then
    > MM_redirectLoginSuccess = 'WelcomeMyles.asp' ElseIf
    > Session('MM_UserAuthorization') = '4' Then MM_redirectLoginSuccess =
    > 'WelcomeZvi.asp' Else MM_redirectLoginSuccess = '?Action=Failed' End If
    >

    Singularity.co.uk Guest

  4. #3

    Default Re: User Authentication Problem

    A common problem is stray spaces in the database where you've stored the
    access level. '1 ' is not the same as '1'.

    "Eric8000" <webforumsuser@macromedia.com> wrote in message
    news:d0317b$4i7$1@forums.macromedia.com...
    > I've created a login page which checks the user's access level against an
    > Access database. Works fine for level members 2 and 3. - 1 and 4 get
    denied.
    > Please see the code below. Thanks in advance! ' redirect user based
    on
    > Access level If Session('MM_UserAuthorization') = '1' Then
    > MM_redirectLoginSuccess = 'WelcomeEric.asp' ElseIf
    > Session('MM_UserAuthorization') = '2' Then MM_redirectLoginSuccess =
    > 'WelcomeTrish.asp' ElseIf Session('MM_UserAuthorization') = '3' Then
    > MM_redirectLoginSuccess = 'WelcomeMyles.asp' ElseIf
    > Session('MM_UserAuthorization') = '4' Then MM_redirectLoginSuccess =
    > 'WelcomeZvi.asp' Else MM_redirectLoginSuccess = '?Action=Failed' End If
    >

    CMBergin Guest

  5. #4

    Default Re: User Authentication Problem

    Thank you. Forgive me for not being an avid programer. So, I tried your
    suggestion. When I go to the login page now, I get this... Microsoft VBScript
    compilation error '800a0409' Unterminated string constant /peer/login.asp,
    line 40 MM_redirectLoginSuccess = '?Action=Failed&amp;UserLevel='&amp;
    ------------------------------------------------------^ What do you think?

    Eric8000 Guest

  6. #5

    Default Re: User Authentication Problem

    Make sure there's no line breaks. The whole command must be on one line
    (the forum put a line break into the sample code which wasn't there).

    "Eric8000" <webforumsuser@macromedia.com> wrote in message
    news:d04hpm$gjk$1@forums.macromedia.com...
    > Thank you. Forgive me for not being an avid programer. So, I tried your
    > suggestion. When I go to the login page now, I get this... Microsoft
    VBScript
    > compilation error '800a0409' Unterminated string constant
    /peer/login.asp,
    > line 40 MM_redirectLoginSuccess = '?Action=Failed&amp;UserLevel='&amp;
    > ------------------------------------------------------^ What do you
    think?
    >

    CMBergin Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139