Click here to Skip to main content
12,634,651 members (24,967 online)
Rate this:
 
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 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

-----------

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

<system.web>
<compilation debug="true">
<authentication mode="Forms">
<forms loginUrl="Account/login.aspx" name=".ASPXFORMSAUTH" timeout="1200">
</forms>

<authorization>
<deny users="?">

<customerrors mode="Off">



-------------
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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.161208.2 | Last Updated 1 Oct 2012
Copyright © CodeProject, 1999-2016
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