Asp.Net - Multiple projects and web.configs

Soldato
Joined
5 Mar 2003
Posts
10,771
Location
Nottingham
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.
 
Thanks, but not the answer I was looking for :) Not really asking for an answer to the email / logic questions, more asking how you get the business logic projects to get their information from the business logic config files... not the running (website) project, without hardcoding stuff!
 
Back
Top Bottom