Solved

Passwords in web.config

Posted on 2006-06-26
3
981 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
  • 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
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 …
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

685 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