Click here to Skip to main content
11,415,074 members (75,635 online)
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 Sergey Alexandrovich Kryukov 9,200
1 OriginalGriff 7,512
2 Maciej Los 3,710
3 Abhinav S 3,298
4 Peter Leow 3,084


Advertise | Privacy | Mobile
Web03 | 2.8.150427.4 | Last Updated 1 Oct 2012
Copyright © CodeProject, 1999-2015
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