Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 23rd, 2006, 12:21 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default "ALTER USER ..." commandproblem

Hello Forum Members,

I am experiencing very interesting problem in my ASP.NET application when I am changing the user password in ORACLE database using "ALTER USER..." command from inside of my code.
Example:
The user "TestUserName" has the current password, let's say "User1".
After I change the password to "User2", I can login into my application with the OLD and with the NEW passwords by some reason?
If I check the password for the current "TestUserName" in the database, it has the newest value ("User2"). From the SQLPlus I can login into the database only with the newest password. But from my application I can still login using both passwords? If I close the application, close the browser and start the application again, I still can login using two passwords. But, if I restart the PC, the old password disappeared. What is going on?

Any suggestions?

Thanks in advance,
-Dmitriy
  #2 (permalink)  
Old October 23rd, 2006, 12:25 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

What do you mean the "old password disappeared"?

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
  #3 (permalink)  
Old October 23rd, 2006, 12:36 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default

The "old password disappeared" means I can use only the newest password "User2" after the PC has been restarted. The password "User1" does not work anymore.
  #4 (permalink)  
Old October 23rd, 2006, 12:41 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

In your example, TestUserName, is this a user who is logged into a forum or the username embeded in your query string used to access the database?

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
  #5 (permalink)  
Old October 23rd, 2006, 12:58 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default

In my example the "TestUserName" is the value of the variable sUserId I place into the command string. This is the fragment from the code I am using:

 'Begin Transaction here:
                objTransaction = CType(wsDataBasesService.GetMERCURYConnection(), OracleConnection).BeginTransaction()

                sUserId = Trim(txtUserID.Text)
                sPassword = Trim(txtPasswordAgain.Text)

                sCommandText = "ALTER USER " & sUserId & " IDENTIFIED BY " & sPassword & ""
                cmd = New OracleCommand("", CType(wsDataBasesService.GetMERCURYConnection(), OracleConnection))
                cmd.CommandType = CommandType.Text
                cmd.CommandText = sCommandText
                cmd.ExecuteNonQuery()
                ''cmd.Transaction = objTransaction
                cmd.Dispose()
                cmd = Nothing

                'Commit transaction and dispose:
                objTransaction.Commit()
                objTransaction.Dispose()
                objTransaction = Nothing
  #6 (permalink)  
Old October 23rd, 2006, 01:13 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

It doesn't make sense to me since the value for oracle is persisted on that server and it should kick out any attempt to login with an incorrect username and password. Since restarting the PC is the only thing that works, it seems like something is being persisted until you restart the machine, a cookie maybe. In any case there is no reason why this should be happening.

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What do I need to add/alter? obrienkev C# 2005 1 November 1st, 2007 12:04 PM
Alter Column SQLScott SQL Server 2005 5 January 5th, 2007 11:53 AM
"ALTER USER.." command problem Dmitriy Oracle ASP 0 October 23rd, 2006 12:24 PM
Alter in View rekha_jsr Oracle 1 December 3rd, 2004 09:17 AM
ALTER TABLE Daniel Schaffer Access ASP 0 April 25th, 2004 12:47 PM



All times are GMT -4. The time now is 12:50 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.