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 want to read username and password from web.config file.

Username,password will be stored in custom tags of web.config file of sharepoint project.

share|improve this question

2 Answers 2

Ouch - don't do this! Use the Secure Store Service to map user credentials. It is designed to store and map credentials in a very secure way.

share|improve this answer

its simple, check this out on msdn it explains it really simply:

but this shouldnt store a user ID/Password ;) that should be kept in AD(active Directory)

if its for a webpart to connect like to K2 server or SQL then its fine:

reading connection string: http://msdn.microsoft.com/en-us/library/ms178411

Read app settings from web.config http://msdn.microsoft.com/en-us/library/610xe886.aspx

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.