the only real issue is security. if the connect string require user and password, then you need to securely store the string. if the connection is integrated, then if the app is a desktop app, no issue, but if website, then the connection will be made with the pool account. a user could enter another users connection string to access their data.
Is it correct to make connection string dynamic?
Hi, I'm currently working on a project which need data from other databases. The database where I'll get the datas are depends on users. Now I want to make my connectionString dynamic. Is it correct to make connection strnig dynamic. The user will enter the connection string registration and I'll save it in my local database. And then I will get datas from there with adonet. Is it right way of coding or there is other ways to do this better?
2 answers
Sort by: Most helpful
-
-
SurferOnWww 3,031 Reputation points
2024-05-21T00:39:09.69+00:00 The user will enter the connection string registration and I'll save it in my local database. And then I will get datas from there with adonet. Is it right way of coding or there is other ways to do this better?
I do not think it (i.e., "The user will enter the connection string") is good idea due to security reasons. Why don't you create the user-dependent connection string at the server side?