How do i restrict access using login routine?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • beyrself
    New Member
    • Dec 2008
    • 6

    How do i restrict access using login routine?

    Hi, i've created a application using microsoft visual studio 2005. I've publish the exe application using IIS. now is issue is. I need to restrict the login part. For example is A login to this website.. B cant login until A log off.
    I'm using VB.net BTW!

    Below is the code for my login page.
    [code=vbnet]
    Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles OK.Click
    If UsernameTextBox .Text = "admin" And PasswordTextBox .Text = "admin" Then
    Form1.Show()

    Else
    MsgBox("Incorre ct password", vbExclamation, "Header")
    UsernameTextBox .Text = ""
    PasswordTextBox .Text = ""
    End If
    End Sub


    [/code]
    Can anyone help? THANKS
    Last edited by Frinavale; Dec 29 '08, 10:06 PM. Reason: added [code] tags
  • MrMancunian
    Recognized Expert Contributor
    • Jul 2008
    • 569

    #2
    Hi,

    First, I don't see the connection between you exe and IIS...Anyone else?

    Second, it's difficult to check whether someone else is logged in if you check the username and password without using a variable. I think the only way to check this is some sort of boolean in a database that is checked whether the user is logged in. Of course, problem is that when someone logs out without going thru the procedure that unchecks the boolean, no one can login anymore.

    Steven

    Comment

    • Frinavale
      Recognized Expert Expert
      • Oct 2006
      • 9749

      #3
      I don't understand how IIS plays a part in your application either.....

      Are you developing a Desktop application or ASP.NET application?

      Comment

      Working...