Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When does WCF use app.config or web.config?

I am working on a WCF applicaiton. I am very confused about when to use a web.config file and app.config file in WCF client and service. can anyone help me when to use app.config and when to use web.config.

like image 286
Jebli Avatar asked Jul 25 '11 09:07

Jebli


2 Answers

Is it hosted with IIS? Web.config. Is it hosted as a standalone service? App.config.

http://msdn.microsoft.com/en-us/library/ms733932.aspx

like image 144
J. Steen Avatar answered Sep 30 '22 16:09

J. Steen


When configuring a service in Visual Studio, use either a Web.config file or an App.config file to specify the settings. The choice of the configuration file name is determined by the hosting environment you choose for the service. If you are using IIS to host your service, use a Web.config file. If you are using any other hosting environment, use an App.config file.

like image 32
sansalk Avatar answered Sep 30 '22 17:09

sansalk