0

I would like to know following 2 things.

I am using outlook 2007 Add in.

  1. How to read App setting for deployed outlook plugin.

I have used following things for this to read configuration file.

ConfigurationManager.OpenExeConfiguration(Assembly.GetExecutingAssembly().CodeBase.ToLower().Replace("file:///", ""));

Please let me know if you have better way for this.

2.For calling WCF client i need to load all wcf configuration defined in App.config

       EndpointAddress endpointAddress = new EndpointAddress(endPoint.Address);
                        serviceWS = new serviceWS(new BasicHttpBinding(), endpointAddress);

I would like to load all app.config setting for WCF.

3.Also I would like to know if it is possible to change dll.config deployed on machine and reflect those changes in plugin(make sure plugin read dll.config)

Thanks for help

np.
  • 49
  • 1
  • 5

1 Answers1

0

To answer part one. I put my configurations in the App.config of my Addin

You will need to override ConfigurationSection and you may need to look at ConfigurationElementCollection & ConfigurationElement all in the System.Configuration namespace

The App.config is deployed with the addin so you shouldn't have to do anything fancier than this

var section = (MyAwesomeConfigSection)ConfigurationManager.GetSection("AwesomeConfigSection");

I don't really understand the rest of your question

Peter
  • 7,792
  • 9
  • 63
  • 94