We want to ensure that we are following best practice around connecting to a custom database. I'm not a developer as such so thought I would ask SharePoint Overflow :-).
We have several SharePoint Web parts that connect to a custom SQL DB. We have a set of ASP.NET 4 forms that connect to the same database.
Looking through this article I gather that storing the credentials used by our Web parts in a SPWebApplication object would be a good idea.
For our Web forms we were planning on storing the credentials in an encrypted form in web.config files.
A few questions:
- Presumably we would need to decrypt credentials using a key; how do we ensure that this is secure?
- Is there a means by which we can store a "global" set of credentials securely rather than having to duplicate them in web.config files and SharePoint objects? I imagine we will run into permission issues if we attempt to store credentials in the SPFarm object.
Thanks in advance for any assistance you might be able to offer.