Solved

Passwords in web.config

Posted on 2006-06-26
3
994 Views
Last Modified: 2006-11-18
I have been able to run though this example and get it working: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/paght000006.asp

However, what parts should i keep and delete in the web.config?  Also, how does the code change when accessing it?

Currently all i am trying to encrypt is

      <smtp deliveryMethod="Network" from="this@that.com" >
        <network defaultCredentials="false" host="there.this.that" userName="them" password="dunno"  />
      </smtp>

Later when i put in a database i will need to do that connection string aswell.  Currently I only need the <network.. to be encrypted.  I have tried this example and it seems to put the new encrypted text in connection strings.  Do i leave them in there or do i move it to smpt?  Also, is there anywhere in the web.config that let's the program know what parts the encryption is for and what type of encryption it is using?

Thanks, this is kind of baffling me, but it seems like a 'do it once' and u'll know it forever type of thing.


0
Comment
Question by:UnexplainedWays
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
GENTP earned 500 total points
ID: 16987733
I used this tutorial to understand the concepts, then simply encoded the connection string in the web.config as an appsettings key. I also encrypt the passwords in the DB, but that isn't really related to your question.

http://aspnet.4guysfromrolla.com/articles/082703-1.aspx

I think that by doing it right in the web.config, then going to a db, you aren't really saving yourself any time. I'd recommend just diving straight into doing it on the DB.

G
0
 
LVL 12

Author Comment

by:UnexplainedWays
ID: 16989597
"I'd recommend just diving straight into doing it on the DB."

The smtp network will always be in the web.config, the connection string to the database will be added later to the config file.
0
 
LVL 12

Author Comment

by:UnexplainedWays
ID: 16989611
I just had a look at your link, and that's more for people logging in to you website and what they are allowed to do, the xml i provided is used to send emails via smtp.  When you create a new smpt() it goes into your web.config and pulls out this information, so it's easy to tweak in there.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will learn how to dynamically set the form action using jQuery.

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question