I work in a company where we have a lot of small ASP.Net/C# apps. I've been making efforts to centralize as much of the functionality as possible by creating shared libraries for common functions (like Active Directory lookups, FTP, etc).
I'm trying to create an email dll that will perform SMTP interactions. I'd like to make this config-based so it's dynamic but I don't have to put a SMTP Server name, port, etc in every web.config.
Is there a best practice to make a shared library that is config-based but doesn't rely on each app's web.config? I'd also prefer not to have it tied to the machine.config so it's portable.
I want each app to be able to call methods without having to pass in the parameters:
EmailLib.SendEmail("[email protected]", "This is the subject",....);
Thanks.