Set Password on sqlclient
-
Hello, Is there any way to manipulate the password on a sqlclient connection? something like save the connection string in a config file and set the password later in the code, which will be read from an encrypted string. I don't want to use Windows Security because i don't know where the server will be and what clients will connect or if they are on a workgroup or domain. Any ideas will be appreciated. Thanks.
-
Hello, Is there any way to manipulate the password on a sqlclient connection? something like save the connection string in a config file and set the password later in the code, which will be read from an encrypted string. I don't want to use Windows Security because i don't know where the server will be and what clients will connect or if they are on a workgroup or domain. Any ideas will be appreciated. Thanks.
You can do anything to the connection string before you use it to connect to the database, it's just an ordinary string. I suggest that you put a marker in the connection string, for an example a tag like [pwd], then replace that tag with the password. --- b { font-weight: normal; }
-
Hello, Is there any way to manipulate the password on a sqlclient connection? something like save the connection string in a config file and set the password later in the code, which will be read from an encrypted string. I don't want to use Windows Security because i don't know where the server will be and what clients will connect or if they are on a workgroup or domain. Any ideas will be appreciated. Thanks.
You can write it in a config file ofcourse. Then you can get from there to your connection string. But you know that it is not secure. Maybe it is not so important for you.. If it is important, you can enchrypt it. this means a lot of work :)