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 11:34am
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 Maciej Los 469
1 OriginalGriff 379
2 CPallini 205
3 Sergey Alexandrovich Kryukov 170
4 Sharmanuj 109
0 OriginalGriff 5,649
1 Sergey Alexandrovich Kryukov 4,783
2 Peter Leow 2,954
3 Maciej Los 2,689
4 DamithSL 2,465


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