Difference between web.config and app.config?

Answer Posted / reva ram sahu

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.

app.config is used for windows applications. When you build
the application in vs.net, it will be automatically renamed
to <appname>.exe.config and this file has to be delivered
along with your application.

You can use the same method to call the appsettings values
from both config files :

System.Configuration.COnfigurationSettings.AppSettings["Key"]

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to comment out asp.net tags?

629


What is asp short for?

559


What is strong-typing versus weak-typing?

579


Who generates session id?

486


Differentiate between client-side and server-side validations in web pages.

557






How can we prepairing Interview

1884


Explain client side state management system.

564


In order to bind the data from a data source to the Repeater control what property is set and what method must you call in your code,?

595


What is the difference between page-level caching and fragment caching?

529


What is the use of session state and application state and difference between them?

479


What is the purpose of using MVC programming pattern in ASP.NET?

553


What are the different session state management options available in asp.net?

515


Explain the difference between the web config and machine config.

623


How do you deploy your asp.net application?

535


IN an ASP.NET Web application if there is any error, how can you debug?

579