Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have WCF service hosted in IIS. I want my service to read some configuration from config file. When i host the service in IIS which config file i need to Update
Posted

As you mention that you have develop WCF serverice, that service also have web.config file its your configuration file you can read from it, its separate for your application only, other application can't use it. Or also you can add App.Config file in your project its also an configuration file to be used for storing configurations.
 
Share this answer
 
All the configuration about your WCF goes in web.config.
And yeah, it is almost impossible to read from that file programmatically. But yes, if you have implemented it by yourself then you don't have to worry about that.

If you're adding the reference of this WCF to some client (i.e console app, form app, web site etc...), one file is created over there as well, which holds all of the configuration of WCF on client side, known as app.config.

It seems that you have already hosted WCF on IIS, you can directly read the configuration from it. :)

-KR
 
Share this answer
 
I updated the web.config file. It worked.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900