Hi,
I've got a web application and then a separate project where I put all the functionality that might be reused on other web apps. One of the methods is to send an email.
I've got the exchange / username and password stored in the app.config of the project where the email code is. The problem is the email never gets sent unless I copy and paste that section of the app.config into the websites web.config. Now this isn't exactly what I want as if the exchange changes, I need to change it in loads of places (one per site).
Now I could work around the problem either by hardcoding it in the method or by hardcoding access to the app.config file, but I can't help but feel I'm missing the 'obvious' and correct way to do this.
Any ideas?
Cheers.
I've got a web application and then a separate project where I put all the functionality that might be reused on other web apps. One of the methods is to send an email.
I've got the exchange / username and password stored in the app.config of the project where the email code is. The problem is the email never gets sent unless I copy and paste that section of the app.config into the websites web.config. Now this isn't exactly what I want as if the exchange changes, I need to change it in loads of places (one per site).
Now I could work around the problem either by hardcoding it in the method or by hardcoding access to the app.config file, but I can't help but feel I'm missing the 'obvious' and correct way to do this.
Any ideas?
Cheers.