Hi there fellows!
I have an host application that launches another application (client) in runtime (process.start) and I need it to use hosts app.config, to use the system.diagnostics for logging configuration!
The problem is that when the client is launched independently, using it's own app.config file, it works fine, but when using the hosts, it doesn't! doesn't log anything at all...
Any clue on this?
Thanks a lot!
johnny
Loading
Roei BarPosted Aug 3, 2009, 8:49 AM
what you stated is in fact based on the idea that those Processes have actualy differant Configuration, they are running in other AppDomains, if you want them to have logging also, you can do it in 2 easy ways,
1. insted of Process Start, use System Reflection and call them in another Thread if you need to create a long time operation.
2. you can use ConfigurationManager.OpenExeMappedConfiguration this will Open in each Host his very own Config FIle
if you liked this answer please mark it as Approved