Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server
Hi all,
I wanted to know if there are tutorials for user management (login, password encryption) without. MembershipProvider
 
Indeed, I have already a database with a list of existing users and unfortunately I can not use MembershipProvider
 
so I want to schedule a appliaction that enables a user to connect to the space program and I want a module to encrypt the connection with asp and sql but I can not find a tutorial to start
 
Can someone help me?
Posted 30-Sep-12 12:34pm
Comments
nader198 at 1-Oct-12 8:32am
   
Hello,
I could make a simple function to connect to the database. but I know the level of security that is not good.
here my scripts
 
webconfig.xml
 
-----------
 





<forms loginUrl="Account/login.aspx" name=".ASPXFORMSAUTH" timeout="1200">
</forms>







 
-------------
logon.aspx.cs
-----------
 
sql = "select * from users where [user] ='@" + user.Text + "' and [mpassword]='@" + passoword.Text + "'";
string connetionString = null;
SqlConnection connection;
SqlDataAdapter adapter = new SqlDataAdapter();
DataSet ds = new DataSet();
int i = 0;
connection = new SqlConnection(connetionString);
try
{
connection.Open();
adapter.SelectCommand = new SqlCommand(sql, connection);
adapter.Fill(ds);
connection.Close();
 
if (ds.Tables[0].Rows.Count > 0)
{
 
HttpCookie username = new HttpCookie("user");
 

username.Value = user.Text.ToString();
Response.Cookies.Add(username);

FormsAuthentication.RedirectFromLoginPage
(user.Text, Persist.Checked);
}
 

}
catch (Exception ex)
{

}
--------------------------
 
I'm trying to learn how to encrypt passwords and how can i Implement my own Membership Provider

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 5,170
1 DamithSL 4,357
2 Maciej Los 3,750
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,851


Advertise | Privacy | Mobile
Web01 | 2.8.141216.1 | Last Updated 1 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100