Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm writing an application page in SharePoint and I want to securely store the connection string. I've used a variety of methods before but they all seem a little "suspect". What is the recommended approach for securely storing connection strings in SharePoint?

If the answer is in the web.config, what is the recommended way for managing the values here?

share|improve this question

2 Answers 2

up vote 4 down vote accepted

I would not recommend to store any custom application settings in the web.config! Consider using a custom SPPersistedObjects as explained by Wictor Wilén in Six ways to store settings in SharePoint

If your connection string needs a username and password to the backend system then you should also think about using the Secure Store Service. It provides a secure way of storing and mapping user credentials.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.