Coonection Strings in web.config
-
Hi, in asp.net why we are writing connection strings in web.config?.can't we store connection strings in class or in any dll. With regards, anu
It doesn't make as much sense in ASP.NET because it is compiled on demand. However, the reasoning is that configuration settings should not be compiled into an application. Also, SOX compliance and good corporate governance means a developer should not have access to production passwords, thus a network admin needs to be able to make the adjustments.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway -
Hi, in asp.net why we are writing connection strings in web.config?.can't we store connection strings in class or in any dll. With regards, anu
It's your choice of keeping connection string. It can be kept anywhere. But keeping it in a configuration file like web.config, allows to edit the value without recompiling your application.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
It's your choice of keeping connection string. It can be kept anywhere. But keeping it in a configuration file like web.config, allows to edit the value without recompiling your application.
All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
yes you configure a connection string programmatically in every class on your application. of course, I'm sure you wated the conection strings to be saved in the settings, ypu could do it by adding the necessarily references. as well you can use your dataset designer to do it.
Shimi
-
Hi, in asp.net why we are writing connection strings in web.config?.can't we store connection strings in class or in any dll. With regards, anu
Also we can protect the connectionstring specified in connectionstrings section of web.config.
Arun J