Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > .NET Framework

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-23-2008, 01:41 PM
=?Utf-8?B?R3JleWhvdW5k?=
 
Posts: n/a
DPAPI with One Touch Deployment

I am struggling with encrypting connection strings in my Winsows Forms
application. I am using VS2005 and I am using DPAPI to encrypt my connection
strings in the config file. I am using One Touch Deploymnet to put my
application out on a network drive. The problem I am having is when a user
installs my application from the network drive, they get an error when the
application tries to decrpt the connection string. I have been reading about
DPAPI and I have found that it is either user or machine specific. Does this
mean I am using the wrong encryption method for what I am trying to
accomplish? If so, what method should I use for network installations?
Reply With Quote
  #2 (permalink)  
Old 07-25-2008, 03:30 PM
=?Utf-8?B?SmVmZiBHcm9zc21hbg==?=
 
Posts: n/a
RE: DPAPI with One Touch Deployment

I think the problem is a misunderstanding of DPAPI. If you use the
"machine"-based DPAPI key to encrpt your connection string, it can only be
decrypted on the machine that encrypted it. That doesn't sound like it will
suit your needs. If you use a "user"-based DPAPI key, it can be decrypted
only by someone signed in as that user, and even then, only on the original
machine unless you have enabled roaming profiles. And that doesn't sound like
it will meet your requirements either.

The underlying dilema is that your are trying to protect a shared SQL
credential. That is not a secure architecture. I see two solutions for you:

1) If your clients all reside in an enterprise Windows Active Directory
domain, your can use Windows authentication for your SQL access.

2) If not, you can introduce a middle tier that acts as a proxy for the
database connections. Many would argue this is a more sound approach anyway
as having the client tier directly access the data tier will eventually cause
you all sorts of problems.

My apologies if by "connection string" you meant something other than to a
database or if you are not using SQL Server (in which case #1 does not apply).

"Greyhound" wrote:

> I am struggling with encrypting connection strings in my Winsows Forms
> application. I am using VS2005 and I am using DPAPI to encrypt my connection
> strings in the config file. I am using One Touch Deploymnet to put my
> application out on a network drive. The problem I am having is when a user
> installs my application from the network drive, they get an error when the
> application tries to decrpt the connection string. I have been reading about
> DPAPI and I have found that it is either user or machine specific. Does this
> mean I am using the wrong encryption method for what I am trying to
> accomplish? If so, what method should I use for network installations?

Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > .NET Framework


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:12 AM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0


Sponsors:
Proxy | Credit Report | Credit Counseling | Books | Ringtones



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109