473,395 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Changing password

I have a console application in VB.NET that I have hard coded the
username/password for the SQL database. Haven't been programming for
long, so don't know much about the tools available.

The password will be changed regularly. Is there a way to store the
password, or grab it from somewhere so that the program will not have
to be recompiled everytime the password is changed? Any suggestions
would be appreciated.

Nov 21 '05 #1
4 1343
encrypt it using the encryption classes in .NET and store it in an external
file. That way you only need to change the file.

--

Bob

--------------------------------------
I'll have a B please Bob.

<kr*****@hotmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
I have a console application in VB.NET that I have hard coded the
username/password for the SQL database. Haven't been programming for
long, so don't know much about the tools available.

The password will be changed regularly. Is there a way to store the
password, or grab it from somewhere so that the program will not have
to be recompiled everytime the password is changed? Any suggestions
would be appreciated.

Nov 21 '05 #2
You could store it in an xml file in the application data directory or in the
registry.

When you go to check your password against what has been entered by the
user, don't forget to call 'ZeroMemory' to wipe it from memory

Private Declare Sub ZeroMemory Lib "kernel32.dll" Alias "RtlZeroMemory" _
(ByVal Destination As String, ByVal Length As Integer)

ZeroMemory(txtPassword.Text, txtPassword.Text.Length * 2)

This clears the password entered into txtPassword (TextBox) & writes twice
the length of zeros

"Bob Hollness" wrote:
encrypt it using the encryption classes in .NET and store it in an external
file. That way you only need to change the file.

--

Bob

--------------------------------------
I'll have a B please Bob.

<kr*****@hotmail.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
I have a console application in VB.NET that I have hard coded the
username/password for the SQL database. Haven't been programming for
long, so don't know much about the tools available.

The password will be changed regularly. Is there a way to store the
password, or grab it from somewhere so that the program will not have
to be recompiled everytime the password is changed? Any suggestions
would be appreciated.


Nov 21 '05 #3
I'd also like to encrypt the password. There is no user input, it is
just one username/password to access the SQL Server. I'm assuming that
an external source is the best choice. I'm not sure how to do that or
which is the best to use (XML, txt, mdb). Any examples would be
appreciated.

Nov 21 '05 #4
http://tinyurl.com/5n274

Greg
<kr*****@hotmail.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
I'd also like to encrypt the password. There is no user input, it is
just one username/password to access the SQL Server. I'm assuming that
an external source is the best choice. I'm not sure how to do that or
which is the best to use (XML, txt, mdb). Any examples would be
appreciated.

Nov 21 '05 #5

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

Similar topics

4
by: ecPunk | last post by:
Hi, We have a web application where we want a user to be able to change his/her password if the password has expired but we are unable to do this with ASP (at the moment) because we can't log...
1
by: patrickshroads | last post by:
I just started a new job and no one seems to know the SA password. Here's my plan to change it: 1. I've run a trace for a couple of days to verify that there are no jobs or processes that are...
1
by: Mindy Geac | last post by:
Hello, I'm seaching for the possibility to change Domain/User passwords. And a check for users if the password has to change with the first logon or when the password is expired. thanx, ...
1
by: black lee via DBMonster.com | last post by:
we would like to provide users with changing password feature in our application. I understand that db2 uses password of operating systems. does anyone know if there is sql commend or api we use in...
10
by: Fabrizio | last post by:
(Sorry for the crosspost, but I really don't know which is the right newsgroup!) Hi all, I try to change the password to a user that as to change the password at first logon: try {
3
by: Prabu Subroto | last post by:
Dear my friends... I am using SuSE 9.1 and postgres 7.2.x . Each time if I want to connect to postgres with postgres I do like this: " patrixlinux@patrix:~> su Password:...
2
by: Greg Wickham | last post by:
Hi All, Earlier this year there was a discussion between Tom and Ezra regarding extending 'set session authorization' to facilitate changing the identity of a connection. A synopsis of the...
4
by: muchexie | last post by:
I have developed a login system but its failing to allow the user to change password. Here is my code. <? require_once("system_fns.php"); session_start(); do_html_header("Changing...
4
by: John Kotuby | last post by:
Hi all, I have a simple user-form which accepts contact and profile information for the user to edit and save. All the textboxes are working fine and displaying the expected data, both when the...
0
by: =?Utf-8?B?RWQgT3R0bw==?= | last post by:
When changing a user's password in Active Directory Users... I get a strange error message (and the password change fails): Windows can not complete the password change for the user <insert user...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...

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.