Hi friends
what is the difference between writing a connection in a class file and web config file
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Posted Oct 15, 2007, 12:57 AM EDT
hi, this as per my knowledge n u can also have the guidelines forums of mmicrosoft also
web.config is used with web applications. web.config will by default have several configurations required for the web application. You can have a web.config for each folder under your web application.
.exe.config and this file has to be delivered along with your application.
.exe.config, you have to restart the application.
app.config is used for windows applications. When you build the application in vs.net, it will be automatically renamed to
You can use the same method to call the appsettings values from both config files :
System.Configuration.COnfigurationSettings.AppSettings["Key"]
If you make any changes to the web.config, web application will immediately load the changed config. But in case of
What about console applications? They don't seem to have an app.config file when I create such a project in Visual Studio. However, I'm working with the Logging Application Block sample apps, and the console ones have an app.config file. I don't know if that config file was manually created by whoever made the sample, or if it is supposed to be automatically added to the project somehow.