Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Security (http://www.velocityreviews.com/forums/f62-asp-net-security.html)
-   -   DPAPI (http://www.velocityreviews.com/forums/t768194-dpapi.html)

juan@msdnCompany.com 01-17-2006 09:51 PM

DPAPI
 
I am trying to use the DPAPI for encryption of some string data. I took the
code right from the MSDN example:
http://msdn.microsoft.com/library/de...secnetht07.asp

Encryption goes off without any issues, but when I try to decrypt I get the
following error: Decryption Failed: Unable to update the password. The
value provided for the new password does not meet the length, complexity or
history requirement of the domain.

I tried running my DLL from an ASP.NET page or a .NET app with the same
results. I then turned on user interface and it poped up a dialog on
decryption and I said allow it and decryption still failed.

Do I have something restricting me here on my machine or on my network?
Currently I am just trying to run on my own machine with using the machine
store (I tried user store and it didn't help). I searched around and didn't
find anyone with this same issue. Everyone seemed to just point to the
articles and they acted like it just worked.

Any insights would be appreciated.

--
Thanks,
Juan

Luke Zhang [MSFT] 01-18-2006 06:09 AM

RE: DPAPI
 
Hello,

Did you try it in a windows form application? And DPAPI can work with
either the machine store or user store (which requires a loaded user
profile). DPAPI defaults to the user store, although you can specify that
the machine store be used by passing the CRYPTPROTECT_LOCAL_MACHINE flag to
the DPAPI functions. Have you done this?


Luke


juan@msdnCompany.com 01-18-2006 12:31 PM

RE: DPAPI
 
Yes, I tried both. I started with machine store, because that is what I was
interested in doing in my application.
--
Thanks,
Juan


"Luke Zhang [MSFT]" wrote:

> Hello,
>
> Did you try it in a windows form application? And DPAPI can work with
> either the machine store or user store (which requires a loaded user
> profile). DPAPI defaults to the user store, although you can specify that
> the machine store be used by passing the CRYPTPROTECT_LOCAL_MACHINE flag to
> the DPAPI functions. Have you done this?
>
>
> Luke
>
>


Jim Andersen 01-18-2006 02:22 PM

Re: DPAPI
 

"juan@msdnCompany.com" <juan@newsgroup.nospam> skrev i en meddelelse
news:2BDFCE97-C250-4987-B527-0F5E207D260D@microsoft.com...
> Yes, I tried both. I started with machine store, because that is what I
> was
> interested in doing in my application.


Try hitting the Decrypt button a couple of times. See if the errormessage
changes. I had the same problem yesterday.....

I will check my code and see what I did tomorrow (if noone beats me to it).
Im going home now.

/jim



juan@msdnCompany.com 01-18-2006 02:57 PM

Re: DPAPI
 
A fresh start in the morning always helps.

I saw I was getting the encoding messed up, too much cut and paste in my
test sample. So I am working fine.

Thanks for all of your replies.

--
Thanks,
Juan


"Jim Andersen" wrote:

>
> "juan@msdnCompany.com" <juan@newsgroup.nospam> skrev i en meddelelse
> news:2BDFCE97-C250-4987-B527-0F5E207D260D@microsoft.com...
> > Yes, I tried both. I started with machine store, because that is what I
> > was
> > interested in doing in my application.

>
> Try hitting the Decrypt button a couple of times. See if the errormessage
> changes. I had the same problem yesterday.....
>
> I will check my code and see what I did tomorrow (if noone beats me to it).
> Im going home now.
>
> /jim
>
>
>



All times are GMT. The time now is 05:32 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.