DPAPI

Discussion in 'ASP .Net Security' started by juan@msdnCompany.com, Jan 17, 2006.

  1. Guest

    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/default.asp?url=/library/en-us/dnnetsec/html/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
     
    , Jan 17, 2006
    #1
    1. Advertising

  2. 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
     
    Luke Zhang [MSFT], Jan 18, 2006
    #2
    1. Advertising

  3. Guest

    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
    >
    >
     
    , Jan 18, 2006
    #3
  4. Jim Andersen Guest

    "" <> skrev i en meddelelse
    news:...
    > 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
     
    Jim Andersen, Jan 18, 2006
    #4
  5. Guest

    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:

    >
    > "" <> skrev i en meddelelse
    > news:...
    > > 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
    >
    >
    >
     
    , Jan 18, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. BigLuzer
    Replies:
    1
    Views:
    1,448
    Cowboy \(Gregory A. Beamer\)
    Nov 21, 2006
  2. Kevin Cunningham

    DPAPI and connection string

    Kevin Cunningham, Oct 16, 2003, in forum: ASP .Net Security
    Replies:
    1
    Views:
    159
    Steve Jansen
    Oct 16, 2003
  3. afsheen

    error DPAPI

    afsheen, Oct 24, 2003, in forum: ASP .Net Security
    Replies:
    0
    Views:
    134
    afsheen
    Oct 24, 2003
  4. Shaun

    DPAPI Encryption Constraints & implementation

    Shaun, Jan 9, 2004, in forum: ASP .Net Security
    Replies:
    0
    Views:
    123
    Shaun
    Jan 9, 2004
  5. Ron Ifferte

    DPAPI in a Load Balanced Environment

    Ron Ifferte, Feb 26, 2004, in forum: ASP .Net Security
    Replies:
    2
    Views:
    156
    Alek Davis
    Feb 28, 2004
Loading...

Share This Page