[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

DPAPI with One Touch Deployment

Robert

7/23/2008 1:41:00 PM

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?
3 Answers

Jeff Grossman

7/25/2008 3:30:00 PM

0

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?

- Me - I - My -

12/13/2011 2:59:00 PM

0

He's been deprived of appropriate human influence.

He's malnourished and full of toxins.

He has severe limitations.

He can't help it.

The racist demonstrates failures.

Whites are weaker, more dependent,
and more desperate to exploit others.

On Sat, 03 Dec 2011 15:43:35 -0800, Gunner Asch <gunnerasch@gmail.com> wrote:

>...Seems like that church will self destruct in a rather short time
>simply from internal discontent...

So what?

Liberals would do more to discern
the weakness-based cause of the
racism and help prevent such harm
and heal racists, not merely hope
they slide back into the ooze.


That people endure differing situations does not imply
that those people would differ intrinsically, at least not
to anyone thinking rationally.

On Sat, 3 Dec 2011 09:25:14 -0800, "Wayne" <mygarbagecan@verizon.net> wrote:

>"* US *" wrote in message news:mq1kd7tjtfl58rld3nl751mgd7kjvbll9m@4ax.com...
>>http://www.usatoday.com/news/religion/story/2011-12-03/church-interracial-ban/...
>>"Free Will" Baptists?
>>What a hate-based myth that is.
>-
>On the other hand, they should be allowed to have opinions and to associate
>with whoever [sic] they want.

No one had implied otherwise.

When they have idiotic opinions and associate
only with other idiots, others will point it out.

>And, per the news report, the couple involved didn't want to get married
>there anyway.

So?

>Thus, no problem, except with the thought police.

Non sequitur.

- Me - I - My -

12/13/2011 2:59:00 PM

0

The racist is extremely dependent.

The racist is prone to criminality.

The racist needs better nutrition.

The racist needs better healthcare.