473,503 Members | 1,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do i restrict access using login routine?

6 New Member
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.
Expand|Select|Wrap|Line Numbers
  1.   Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
  2.         If UsernameTextBox.Text = "admin" And PasswordTextBox.Text = "admin" Then
  3.             Form1.Show()
  4.  
  5.         Else
  6.             MsgBox("Incorrect password", vbExclamation, "Header")
  7.             UsernameTextBox.Text = ""
  8.             PasswordTextBox.Text = ""
  9.         End If
  10.     End Sub
  11.  
  12.  
  13.  
Can anyone help? THANKS
Dec 29 '08 #1
2 2317
MrMancunian
569 Recognized Expert Contributor
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
Dec 29 '08 #2
Frinavale
9,735 Recognized Expert Moderator Expert
I don't understand how IIS plays a part in your application either.....

Are you developing a Desktop application or ASP.NET application?
Dec 29 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
3113
by: Paul | last post by:
Hi all, at present I I've built a website which can be updated by admin and users. My problem, I've combined "log in" and "access levels" to restrict access to certain pages, using the built...
10
13034
by: shankhar | last post by:
Hi all, In my project there is a requirement. If a user logged in at a time since he/she logged out others are not allowed to loggin using the same user name. That is to avoid multiple logins...
11
1557
by: Billy Bob | last post by:
Working in ASP/VBSCRIPT, I have a snippet that denies access to a page if the user's IP does not belong to the local network: <% Dim RemoteAddr RemoteAddr =...
17
4764
by: yuvang | last post by:
Hi all I have a mdb with login name and password form. There are several login names, i defined through a table "User_login". Here the problem is at a time a single user is able to login in...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.