Hi All, Is there a way to write in a app.config file the information about endpoints? Actually I want to read tag from one app.config file and want to write it in other app.config file's tag. Please anyone tell me how can I do it?
Actually I have a config file called "WCFService.exe.config" which i want to read in my program , so what i am writing is:
string path = Path.Combine(Application.StartupPath, "WCFService.exe.config");
Configuration config = ConfigurationManager.OpenExeConfiguration(path)
ServicesSection serviceSection =
ConfigurationManager.GetSection("system.serviceModel/services") as ServicesSection;
ServiceElementCollection sereleColl = serviceSection.Services;
but i get nothing in sereleColl , please have a look on this .