473,326 Members | 2,110 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,326 software developers and data experts.

how use asp login control with oracle databse?

2
I how to use asp login control with oracle databse..please explain me and source code.
Dec 23 '08 #1
2 2680
Frinavale
9,735 Expert Mod 8TB
You need to create a Membership Provider that connects to and uses your Oracle database.

Then you need to specify that your custom membership provider should be used instead of the default MySql provider. You can do this by editing your web.config <membership> section.


Check out this article for more information.
Jan 13 '09 #2
You can validate the user by retrieving the user's credentials from the table of the oracle database.

In the aspc page:

Expand|Select|Wrap|Line Numbers
  1.  
  2. <asp:Login ID="Login1" runat="server" OnAuthenticate="Login1_Authenticate">
  3. </asp:Login>
  4.  
Now use the OnAuthenticate event of the Login control to validate the user.

Expand|Select|Wrap|Line Numbers
  1.  
  2. protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
  3. {
  4. if(MyFunctionToValidateUser(Login1.UserName,Login1.Password))
  5. {
  6. FormsAuthentication.SetAuthCookie(Login1.UserName, true);
  7.  
  8. //optionally keep the username in the session and treat this as
  9. //the authentication of the user for the whole application
  10. //now redirect to the page you like to 
  11. }
  12. else
  13. {
  14. //give proper messageing...
  15. //either using your own control or accessing the 
  16. //login contrl's error labels
  17. }
  18. }
  19. public bool MyFunctionToValidateUser(string userName, string password)
  20. {
  21. //Use your internal logic to validate user
  22. //You can retrieve the user information from you tables in the database
  23. //and validate against the input user credentials
  24. //return true if validated
  25. //else return false
  26. }
  27.  
Jan 22 '09 #3

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

Similar topics

2
by: Micha³ Trawinski | last post by:
Hi All I'm a student and I've started my experience with Oracle. I must train Oracle Designer, beacuse of this I've instaled Oracle9iDS but if I want to start Oracle designer, it ask's me about...
0
by: Cherrish Vaidiyan | last post by:
Hello, I have posted an earler query regarding installation of Oracle 9i on Windows 2003 server. Can anyoone help me out with the steps,precaution i have to take. I have 2 system and a...
4
by: Azhar Bilgrami | last post by:
Dear Hi: Hope to see u in good health. " I want to migrate a database which is currently running Unix as Operating System and Oracle ver 6 as Database, it is also using oracle froms version 3...
1
by: sailesh | last post by:
I dropped a login from securities list. and when i try to re add that login and give the user access to a particular database the error message "Error 15023: User or role "user" already exists in...
2
by: Mr. Morad Jamal | last post by:
I want to know how to change the default databse "ASPNETDB.MDF" that the login control connects to (by default) ? i want to let it to connect to a different DB !! I also need a link to a refrence...
3
by: bala | last post by:
Hi Gurus The scenario A MS Access frontend application with Oracle Backend (Linked Tables). The Database UserID and password is not stored and each user has a unique UserID and password. There...
1
by: rohitsingh0000 | last post by:
hi, i want to import the tables of a oracle database into the sql database.but i am getting errors importing some tables with certain coulms.so far as i got the problem is that a column named D_O_B...
3
by: zaifi | last post by:
i am working on asp.net project.but i want use asp login control with oracle database.e.g when i login match user id and password with oracle database. .please give me explain..
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.