471,330 Members | 1,499 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Delpoyment Issue

I made a small windows C# application that has dB functionality. The dB
I'm using is SQL 2000. It worked very fine. The thing I need is to
enable the user to enter the sql server's username and password(many
users with different priviledges and functionality) at runtime b4
proceeding with the application execution using a configuration file or
using a simple form... Any Ideas? If anybodty has links or sample
please forward it to me.

Feb 6 '06 #1
4 1048
Mr Bean,

Why not just open up a login dialog, where they enter their username and
password? Then, you can attempt to call a stored procedure on the database.
Make the stored procedure available to everyone in the app. This way, if
the connection string is wrong (username and password), then the call to the
stored procedure would fail, and you know the login is invalid.

I would recommend using windows logins instead though (you can do it
against the local machine, or AD, I believe, if you dont want to add those
users to the domain), since it is more secure (no username and password in
the connection string).

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mr. Bean" <mk*****@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
I made a small windows C# application that has dB functionality. The dB
I'm using is SQL 2000. It worked very fine. The thing I need is to
enable the user to enter the sql server's username and password(many
users with different priviledges and functionality) at runtime b4
proceeding with the application execution using a configuration file or
using a simple form... Any Ideas? If anybodty has links or sample
please forward it to me.

Feb 6 '06 #2
Actually windows authentication totally slipped of my mind. I have all
the users in AD. However, when i setup a connection using Windows
authentication mode, the workstation id (name of pc) is appended to the
connection string. What i want is to enable any use to simply run the
appp without doing any code modification and compilation, should I
provide a form to enter the workstation id or could it be automated?..

Feb 6 '06 #3
Mr. Bean,

You don't have to add the workstation id to the connection string AFAIK.
Just leave it out.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mr. Bean" <mk*****@gmail.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
Actually windows authentication totally slipped of my mind. I have all
the users in AD. However, when i setup a connection using Windows
authentication mode, the workstation id (name of pc) is appended to the
connection string. What i want is to enable any use to simply run the
appp without doing any code modification and compilation, should I
provide a form to enter the workstation id or could it be automated?..

Feb 6 '06 #4
Solved that issue.. Thanks for help.. I used dynamic
properties(app.config) and it worked fine..

Feb 7 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by George Hester | last post: by
2 posts views Thread by Anthony Cuttitta Jr. | last post: by
reply views Thread by Kevin Spencer | last post: by
reply views Thread by Charles Leonard | last post: by
4 posts views Thread by Paul | last post: by
13 posts views Thread by SAL | last post: by
reply views Thread by rosydwin | last post: by

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.