473,386 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Login issue

Hi,
I have created a web page where I enter my login id, password, and then my
page connects to my database to see if the user is authenticated. If he is,
he can proceed further with other pages.
Please help me to knbow how do I log out a user once logged in? Just reset
the connection to database?
Is there a proper way to do this?
Thanks.
Nov 18 '05 #1
4 1022
Most likely you are tieing your user/pass to the current session so

Session.Abandon()
Session.End()
Curt

"Steven" <an*******@discussions.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,
I have created a web page where I enter my login id, password, and then my
page connects to my database to see if the user is authenticated. If he
is,
he can proceed further with other pages.
Please help me to knbow how do I log out a user once logged in? Just reset
the connection to database?
Is there a proper way to do this?
Thanks.

Nov 18 '05 #2
I do not quite understand what your scenario is but it mainly depends on what authentication mechanism you are using. What do you mean by "logged in"??'
Do you create a cookie? a session variable?? are you using Forms Authentication??

If using Forms Authentication then you would have to call the SignOut method
System.Web.Security.FormsAuthentication.SignOut()

If using an authentication personalized cookie then you would have to set it to a date that already passed

myCookie.Expires = DateTime.Now.AddDays(-1)

If using a session variable then you would have to call Session.Abandon or set Session("MySession") = Nothing or set a flag in a session variable to indicate that the user is not logged in anymore

Anyway IMHO resetting the connection to the database would not make an accurate solution. Please detail your scenario

Hope this helps

Alan Ferrandiz Langley
MCDBA, MCT, MSF Practitioner

"Steven" <an*******@discussions.com> escribió en el mensaje news:#X**************@tk2msftngp13.phx.gbl...
Hi,
I have created a web page where I enter my login id, password, and then my
page connects to my database to see if the user is authenticated. If he is,
he can proceed further with other pages.
Please help me to knbow how do I log out a user once logged in? Just reset
the connection to database?
Is there a proper way to do this?
Thanks.

Nov 18 '05 #3
On Mon, 23 Aug 2004 18:36:39 +0530, Steven wrote:
Hi,
I have created a web page where I enter my login id, password, and then my
page connects to my database to see if the user is authenticated. If he is,
he can proceed further with other pages.
Please help me to knbow how do I log out a user once logged in? Just reset
the connection to database?
Is there a proper way to do this?
Thanks.

If you're using cookie, you send a new cookie with the fields cleared.

--
Tony Cortese
--
Send camera phone photos straight to your online photo album plus a loaded
web hosting package for only $4.95/month - No other Fees
http://www.big-discount-hosting.com
Nov 18 '05 #4
I set up the connection string with the USE AND PASSWORD. I open the
connection and check for errors.

Set Con = Server.CreateObject("ADODB.Connection")
Con.ConnectionTimeout=40
U=Request.Form("USER_ID")
P=Request.Form("Password")
ConStr="Provider=MSDASQL.1;Password=" & P & ";Persist Security
Info=True;User ID=" & U & ";Data Source=XXX"
Con.Open ConStr
If Err.Number<>0 Then
Authorized=0
Else
Authorized=1
End If
Con.Close
Set Con=Nothing

"Steven" <an*******@discussions.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,
I have created a web page where I enter my login id, password, and then my
page connects to my database to see if the user is authenticated. If he is, he can proceed further with other pages.
Please help me to knbow how do I log out a user once logged in? Just reset
the connection to database?
Is there a proper way to do this?
Thanks.

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: 23s | last post by:
I had this problem in the past, after a server reformat it went away, and now after another server reformat it's back again - no clue what's doing it. Here's the flow: Website root is public, no...
5
by: RedEye | last post by:
Hello, I am working on a test site to explore the new login controls and membership features of ASP.NET v2.0. I have tested the controls using SQL Express and have now decided to try using a...
14
by: clintonG | last post by:
This is an appeal for peer support sent to Microsoft as will be noted in closing. The Login control does not include a Cancel button. The only option is to convert the Login control to a...
2
by: David Costello | last post by:
Hi all, I keep getting a bizarre login error, when trying to connect to a SQL Server 2005 database on a local domain to my machine using C#. The Exception returns: SQLException: Login failed for...
6
by: =?Utf-8?B?eW9kYWt0?= | last post by:
I'm having issues with logging into my application after moving it from the development server to the live IIS server. Things I've already done: 1) I made sure that I have applicationName set as...
11
by: Anil Gupte | last post by:
I am getting the following error: ********* Login failed for user 'AUM\ASPNET'. Description: An unhandled exception occurred during the execution of the current web request. Please review the...
2
by: =?Utf-8?B?U2hhbm5vbg==?= | last post by:
I am trying to publish an application to a server that I do not have desktop access to because of our hosting environment. I publish to a file share. The WEB site has been configured by the hosts...
3
by: shanthiniramu | last post by:
hi... I have an issue in my hosted page while i'm login when i give an invalid email-id in my login page, the page does'nt show any alert message...... but i wrote coding to show that alert...
0
by: Anup Daware | last post by:
Hi All, I am facing this very weird issue, for every server request my control is redirecting to the login page and again coming back to the actual page from where the request was initiated when I...
9
by: Josh | last post by:
I run a Joomla website and am familiar with php in some but not all aspects. Currently I am trying to find some solutions related to session handling. Am I correct in saying that "login" is kept...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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...

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.