I have an word add in application created in c# which is accessing a web service and is perfectly working if installed outside Program Files folder. the weird thing is that when I install this in Program Files folder, the client is failing to read the config in [application].dll.config and raising an error like below:
"Could not find default endpoint element the references contract [..] in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element."
I have read this article and it seems that it doesn't solve my problem. Could not find default endpoint element
Im using windows7 btw and haven't tested to other OS.
Update: After reading the above link, I've tried to move the configuration to machine.config and it works, but how do I make my application read the application config instead of machine.config?