473,948 Members | 6,543 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: login screen

Hello,
Can anyone give me a link (C#) that handle login screen while keeping
username and password encrypted in the SQL Server?
Thanks,
Jim.
Nov 19 '05 #1
1 1228
You can store the password in md5 format in the database and when the
password is entered, you can convert it to md5 and compare to the md5
password in the database.

use this method to convert a string to md5:

public static string GetMD5HashForSt ring(string value)
{
if (value == null)
throw new ArgumentNullExc eption("The 'value' parameter cannot be null.");

ASCIIEncoding ae = new ASCIIEncoding() ;
byte[] stringAsBytes = ae.GetBytes(val ue);
byte[] hash = new MD5CryptoServic eProvider().Com puteHash(string AsBytes);

// Convert the byte array to a printable string.
StringBuilder sb = new StringBuilder(3 2);
foreach (byte hex in hash)
sb.Append(hex.T oString("X2"));

return sb.ToString().T oUpper();
}

"JIM.H." wrote:
Hello,
Can anyone give me a link (C#) that handle login screen while keeping
username and password encrypted in the SQL Server?
Thanks,
Jim.

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3958
by: Chip | last post by:
I am trying to get sessions to work on a log in screen to give certain users access to certain pages/directories. The problem is that when the login button is pushed (or the enter key pressed) the login screen redraws, never loading the next page. I don't get any error messages. I am using FreeBSD-5.1/Apache-2.0.46/MySQL-4.1.0.1/PHP-4.4.3.4 Thanks, Chip I have pasted the code below -
3
2420
by: Steve | last post by:
I am new to .Net and Visual Studio, I have a login form and my main application form. When I login I want to call the application form, and dispose of the login. I have tried doing something like: This.Hide myAppfrm.Show(); but then when I close down the myAppfrm, the system hangs as the login screen is still floating about in memory. How is this delt with normally in the .Net fraternity?
6
22808
by: Marty | last post by:
What is the best way do a login screen? I have the Main() method in my login screen. After iit checks the userid and password the OK button loads the main application form but the next line is frmLogon.Close() which closes the whole application! If I hide it, the app does not close completely. Thanks.
1
1195
by: Mohan | last post by:
Hi all, I am having a problem implementing forms authentication for a web application. I have a login screen and any unathorized user is directed to the login screen. The problem is that the login screen keeps refreshing even if i enter the correct credentials. using a database to verify the login credentials. the code in the web,config file is as follows.I am not sure what i am missing. I would appreciate any help in this matter.
0
1112
by: JIM.H. | last post by:
Hello, My connection string in config.web: <appSettings> <add key="connStr" value="workstation id=myServer;packet size=4096;user id=MyUser;data source=MYSERVER;persist security info=True;initial catalog=MyDB;password=MyPass"/> </appSettings> I know this works since I am verifying username from a table in the login
9
2579
by: dana lees | last post by:
Hello, I am developing a C# asp.net application. I am using the authentication and authorization mechanism, which its timeout is set to 60 minutes. My application consists of 2 frames - a header frame and a main frame. When i enter the application, i see the login screen on the whole screen, but when the authentication expires, the login screen appears on both frames.
1
2778
by: leovega | last post by:
Hello, My aplication starts with a simple login window (login_page.aspx). Once the login/password is validated I redirect to an html which contains 3 frames. (mywebsite.html) The web site I am working on has 3 frames: left frame is for the menu, top frame is where the user enter the search criteria and main frame
3
2457
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 is no common database UserID and password. Each time the user logs in, the DSN UserID and Password screen is displayed. It has three input box and they are
10
22402
by: =?Utf-8?B?UmljaGFyZCBCeXNvdXRo?= | last post by:
Hi In my app I have a SplashScreen, a login form and a main form. On launching the app, I'd like to show the SplashScreen while reading config files and attempting a database connection. I show progress of these tasks on a label on the SplashScreen form. Once this is completed ok, the splash screen should close and the login form should be displayed. A successful login closes that form and shows the main form.
4
5229
by: Gaz | last post by:
I am having a bit of a problem getting my application to work properly. RIght here is my problem... WHen my C# windows app loads up the start form, i create a new thread and show the splash on the new thread and put the main thread to sleep until the splash screen has done the business, then i kill the new thread and start another to show the login and again put the main one to sleep. Problem i have is that my splash screen will show...
0
10165
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11580
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11354
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9898
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6119
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6339
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4541
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3547
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.