In asp.net, I saw some of web application they are maintaing the connection string in drives of the system, i mean they are storing the connection string in system drives like c:, D: drive. how can i store the connection string in the system drives. please help me.
Asked
Active
Viewed 97 times
0
-
1That's was a not good enough application example. Better use web.config `ConnectionStrings` section. – Yuriy Rozhovetskiy Nov 30 '11 at 11:27
-
what about for intronet application Mr. Yuriy Rozhovetskiy – Surya sasidhar Nov 30 '11 at 11:32
-
This advice not depends on application type. You'll save a lot of time for implementing and much more time for support your application if you will not store connection strings in unobvious place. – Yuriy Rozhovetskiy Nov 30 '11 at 11:40
1 Answers
1
Are you talking about the configSource attribute for the connectionStrings element? You can then store config settings in separate config files, relative to your app folder.
http://msdn.microsoft.com/en-us/library/ms254494(v=vs.80).aspx
There's a related Stack Overflow topic here:
.NET Config Files configSource outside the application directory folder