473,388 Members | 1,198 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Email Credentials Stored In Plain Text

Frinavale
9,735 Expert Mod 8TB
Hello Everyone,

Currently my VB.NET project has two aspx pages that store strings containing my email server access credentials.

I'd like to change this somehow so that these credentials are more secure.

I've tried encrypting them like one would encrypt an impersonated users credentials but the emails are not delivered.

I'm not getting an error when I send the email...everything appears to be fine really until I check my email and note that no email is in my inbox.

Has anyone done this before?

I'm really confused as to how I'm going to successfully encrypt these credentials.

Thanks in advance,

-Frinny
Mar 6 '07 #1
2 1130
Frinavale
9,735 Expert Mod 8TB
Hello Everyone,

Currently my VB.NET project has two aspx pages that store strings containing my email server access credentials.

...

Has anyone done this before?
I'm really confused as to how I'm going to successfully encrypt these credentials.

Thanks in advance,

-Frinny
I've fixed this problem. After trying out 50 wrong ways to solve this problem I finally ended up doing something really simple to encrypt these credentials.

I ended up placing the credentials into <appSettings> in the web.config file and then encrypting the <appSettings> with the aspnet_regiis tool.

I learned how to do the encrypting on this site.

So basically I added this to my web.config
Expand|Select|Wrap|Line Numbers
  1. <appSettings>
  2.     <add key="EmailUserName" value="userName"/>
  3.     <add key="EmailPassword" value="password" />
  4. </appSettings>
  5.  
Then using the Visual Studio command prompt went to the directory where my web site is on my web server and typed:

aspnet_regiis -pe "appSettings" -app "/ApplicationName" -prov "DataProtectionConfigurationProvider"


That resulted in
Expand|Select|Wrap|Line Numbers
  1. <appSettings configProtectionProvider="DataProtectionConfigurationProvider">
  2.     <EncryptedData>
  3.       <CipherData>
  4.         <CipherValue>AQAAANCMnd8BFdERFDSKLFewiondsDIFKODPSnfdaspfasdSfdsryPBDwQAAAACAAAAAAADZgAAqAAAABAAAACs2B+wjsvcnhVhkE+5iXGRAAAAAASAAACgAAAAEAAAABbj/SqXmvI8cBJAGqvzCeUgAQAAsbVwuLJYR6/h5hNpTd+UUqI22S3yX/LHi5VrByXfWPX2tadceln9YTzBty1iF5U/txlwFGY2VZHcAAt7fMamk7yLyJaOuwXJP9BBhWB7sMxxaZrpmhCI1pn+i3AfsuoavODj1Ib6Xln4rXcP+rwO9x+uxuRfDfaskGmVRrdXo/UTmTYY4+FdeqMxmLcLR0LSdnZ9FVt6nk/BZu57xXWQIqywiDnms3PXyDaKbyuvAIp40Gumtu19orx7pEOUMJGeEOSvbycCVmGxCWbCNgghzVMdmO7E6WicsjKF23IrBhTK/hk25KB4e4TEjtLfx77M0SYHmFoNcbyuHLSPHyF5yekkAGv3o3M3bRGGyDTxv2z+HWowp2I14nUiQTTI70cVFAAAAJmO9fUNqnH0XZiXbj6vTJ5kK0mZ</CipherValue>
  5.       </CipherData>
  6.     </EncryptedData>
  7.   </appSettings>
  8.  
Which I'm happy with.

:)

Cheers!

-Frinny
Mar 6 '07 #2
kenobewan
4,871 Expert 4TB
Hi Frinny,

Thanks for sharing the solution :).
Mar 7 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: M Wells | last post by:
Hi All, I'm trying to implement encryption on certain data fields in my MySQL database and I'm experiencing ongoing problems. I seem to be able to encrypt the data without issues, but can't...
10
by: J. Alan Rueckgauer | last post by:
Hello. I'm looking for a simple way to do the following: We have a database that serves-up content to a website. Some of those items are events, some are news articles. They're stored in the...
5
by: BaWork | last post by:
I have a web form where a client can select which site members to send an email to. This form is populated from the contents of the member table, so the form can have 0-x names listed on it...
5
by: Rob Wire | last post by:
For the code below, how could I add an item in the drop down lists for both company and location to be an "All" selection that would send to the stored proc. spRptAttachments a value of "%" so...
19
by: Siobhan | last post by:
Hi What is the recommended way to store a user's database credentials across the pages of a web application so that each time the database is accessed the system doesn't have to ask them for their...
6
by: chris_fieldhouse | last post by:
Hi, I have a script for processing emails, The script finds email sent to a particular alias, grabs the body text of the email and stores it into a database. Problem is that certain character...
3
by: antonyliu2002 | last post by:
I have a website (call it WinAuthWeb) that uses Integrated Windows Authentication. In my ASP.NET web application, I collect user name, password and domain info and pass them to WinAuthWeb for...
4
by: Brian | last post by:
Hello all, we don't actually host our own server but still should work the same. Here is the error message i get "error mailbox unavailable. The server response was: must be authenticated code...
0
by: =?Utf-8?B?TWFyazEyMw==?= | last post by:
I have two pieces of VB.NET code below: a) Sends an email b) Returns a programmatically created jpeg image to a webpage. How can I embed the programmatically created jpeg into an HTML...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.