Here is the problem. I'm developing an application where multiple users are gonna connect to database using different user accounts which has diffrent levels of access rights.
So when someone connects to DB application prompt for username and password and store them.
For that at the moment I'm using a static class. Which contains all the information such as usernames, passowrds etc etc. all as static ones.
So when I want to retrive username I can simply user ClassName.UserName and get the value.
This is workign perfectly fine for single user scenario. What I want to know is will this be alright in multi user environment? if not what is the best alternative I have?
Loading
garukaPosted Sep 14, 2009, 3:51 AM
The thing is I'm developing some new interface to existing application. (which is still in use..but Don't have some features needed at the moment)
I didn't get the concept of using resource file. In that way if anyone can read that file...they should be able to see the user names and passwords I guess :(
Also in this application it is important to track history information too. So that's why I'm directly using oracle user and try to get a connection.
Anyway could you please provide me an example on how to handle multiple users without using my current way..which is having a static class ( I lknow its wrong)
Master BillaPosted Sep 11, 2009, 12:49 PM
I think better ideas store the connection user name and pass word in resource file, when you are a user request to connect sql server just get the connection details and username and password from the resource file and use that to connct to database.
then it's solve the static issues. and also support to future also to add one more user also
thank you
Roei BarPosted Sep 11, 2009, 11:34 AM
user insted only trusted connections in the SQL connectionString this way the limitation for users will be based on the SQL limitation that you have given them