I am stumped on this issue. I have an old ASP environment where users are authenticated against an existing Oracle database. Now I am trying to add new web apps in ASP.NET using VS2010 in vb. Particularly, in existing authentication I have following statements (as part of a big include files with many reusable code):
Set pwd = Server.CreateObject("DecryptOraDB.DecryptPassword")
and in SQL command this pwd is used in where condition which looks like this:
tblusraccounts.password='" & pwd.DeCrypt(CStr(p)) & "'
Just FYI: The table tblusraccounts holds all required firsname, lastname, username, password,etc. I have successfully connected to Oracle database using OracleConnecton and hardcoded specific username and pwd. But I need to be able to verify other users using usrname & password for new app and I cannot find any help how to convert the above two statements in asp.net so that I can use existing DeCrypt method in the object DeCryptOraDB.DecryptPassword.
Here is what I have attempted so far ( created a login form with two textboxes named TextBox1 & TextBox2 and a button and in the button_click event, I have the following code):
Dim pwd As String = "DecryptOraDB.DecryptPassword"
Dim objcon As New OracleConnection(pwd)
objcon.Open()
Dim parm1 As New OracleParameter
parm1.OracleDbType = OracleDbType.Char
parm1.Value = UCase(TextBox1.Text)
Dim parm2 As New OracleParameter
parm2.OracleDbType = OracleDbType.Object
parm2.Value = objcon.DeCrypt(CStr(TextBox2.Text))
--
at the top I also have these statements:
Imports System.Data
Imports Oracle.DataAccess.Client' ODP.NET Oracle managed provider
Imports Oracle.DataAccess.Types
I get blue sqiggly under 'objcon.DeCrypt' (where I am traying to assign TextBox2 value) and when I hover over it, it says 'DeCrypt is not a member of Oracle.DataAccess.Client.OracleConnection'. I have tried to see this connection to object can be defined any other way using intellisys but have not had any success. Please help! Thanks!