Cryptographic service provider (CSP) could not be found for this algorithm.

Discussion in 'ASP .Net' started by Sven-Torben Janus, Sep 7, 2004.

  1. I'm running an ASP.NET webapplication on a Windows 2000 Server SP4 machine
    with .Net Framework 1.0 installed.

    The ASP.Net application uses impersonation (windows domain account). This is
    needed for communication between two servers (some ldap stuff).
    Furthermore the application uses FormsAuthentication. At some point the
    FomrAuthentication.Decrypt method is called. At this point I get the
    following error:


    Cryptographic service provider (CSP) could not be found for this algorithm.
    Description: An unhandled exception occurred during the execution of the
    current web request.
    Please review the stack trace for more information about the error and where
    it originated in the code.

    Exception Details:
    System.Security.Cryptography.CryptographicException:
    Cryptographic service provider (CSP) could not be found for this algorithm.

    Source Error:
    An unhandled exception was generated during the execution of the current web
    request. Information regarding the origin and location of the exception can
    be identified using the exception stack trace below.

    Stack Trace:

    [CryptographicException: Cryptographic service provider
    (CSP) could not be found for this algorithm.]

    System.Security.Cryptography.DESCryptoServiceProvider..ctor() +239
    System.Web.Security.FormsAuthentication.Initialize() +242
    System.Web.Security.FormsAuthenticationModule.OnEnter(Object source,
    EventArgs eventArgs) +146
    System.Web.SyncEventExecutionStep.Execute() +60
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
    completedSynchronously) +87




    The application runs fine on another Win2K SP4 machine and also on some
    other WinXP machines.
    I tried to install the Windows 2000 High Encryption Package. But that didn't
    solve the problem.
    The error doesn't occur when I turn impersonation off. But the application
    needs impersonation so this is no solution.

    So what to do ?
    I searched msdn and the internet but I couldn't find anything that solves
    the problem.

    Any help is appreciatet.

    Thanks in advance.

    Sven-Torben
    Sven-Torben Janus, Sep 7, 2004
    #1
    1. Advertising

  2. Re: Cryptographic service provider (CSP) could not be found for this a

    Hello,

    thanks for your reply.

    It does not seem to be the algorithm.
    I did a lot of testing today. It must have something to do with user
    permissions.
    If I give administrator-priviliges to the aspnet user and to my domain user
    (the one I use for impersonation) everything works fine. (I really don't
    like that).

    I tried all possible combinations of user priviliges (also all the ones
    suggested in different newsgroups) but that doesn't solve the problem.
    I tried filemon and regmon but I could not find any errors.
    If I disable impersonation everything works fine as well.

    btw: IIS uses IntegratedWindowsAuthentication and AnonymousAuthentication
    but I tried all possible combinations. No success.

    Do you have any other suggestions ?

    Regards,

    Sven-Torben

    "lelteto" <> schrieb im Newsbeitrag
    news:...
    > Can you check if the algorithm used is AES? That would explain your

    problem.
    > The MS CSP handling AES is not by default installed on Windows 2000 -
    > although you CAN install it (that's why on some computers it works). It is
    > installed on Windows XP. If this is, in fact, your problem you can solve

    it
    > in two ways:
    > 1. Make sure the AES CSP is installed on your target machines
    > 2. or switch to Triple-DES as algorithm.
    >
    > Laszlo Elteto
    > SafeNet, Inc.
    >
    > "Sven-Torben Janus" wrote:
    >
    > > I'm running an ASP.NET webapplication on a Windows 2000 Server SP4

    machine
    > > with .Net Framework 1.0 installed.
    > >
    > > The ASP.Net application uses impersonation (windows domain account).

    This is
    > > needed for communication between two servers (some ldap stuff).
    > > Furthermore the application uses FormsAuthentication. At some point the
    > > FomrAuthentication.Decrypt method is called. At this point I get the
    > > following error:
    > >
    > >
    > > Cryptographic service provider (CSP) could not be found for this

    algorithm.
    > > Description: An unhandled exception occurred during the execution of the
    > > current web request.
    > > Please review the stack trace for more information about the error and

    where
    > > it originated in the code.
    > >
    > > Exception Details:
    > > System.Security.Cryptography.CryptographicException:
    > > Cryptographic service provider (CSP) could not be found for this

    algorithm.
    > >
    > > Source Error:
    > > An unhandled exception was generated during the execution of the current

    web
    > > request. Information regarding the origin and location of the exception

    can
    > > be identified using the exception stack trace below.
    > >
    > > Stack Trace:
    > >
    > > [CryptographicException: Cryptographic service provider
    > > (CSP) could not be found for this algorithm.]
    > >
    > > System.Security.Cryptography.DESCryptoServiceProvider..ctor() +239
    > > System.Web.Security.FormsAuthentication.Initialize() +242
    > > System.Web.Security.FormsAuthenticationModule.OnEnter(Object source,
    > > EventArgs eventArgs) +146
    > > System.Web.SyncEventExecutionStep.Execute() +60
    > > System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
    > > completedSynchronously) +87
    > >
    > >
    > >
    > >
    > > The application runs fine on another Win2K SP4 machine and also on some
    > > other WinXP machines.
    > > I tried to install the Windows 2000 High Encryption Package. But that

    didn't
    > > solve the problem.
    > > The error doesn't occur when I turn impersonation off. But the

    application
    > > needs impersonation so this is no solution.
    > >
    > > So what to do ?
    > > I searched msdn and the internet but I couldn't find anything that

    solves
    > > the problem.
    > >
    > > Any help is appreciatet.
    > >
    > > Thanks in advance.
    > >
    > > Sven-Torben
    > >
    > >
    > >
    Sven-Torben Janus, Sep 8, 2004
    #2
    1. Advertising

  3. Re: Cryptographic service provider (CSP) could not be found for this a

    I doubt this has anything to do with privileges. May be the user profile
    need to be loaded.

    --
    Thanks,

    Daniel Sie [MSFT]

    This posting is provided "AS IS" with no warranties, and confers no rights.
    "Sven-Torben Janus" <> wrote in message
    news:...
    > Hello,
    >
    > thanks for your reply.
    >
    > It does not seem to be the algorithm.
    > I did a lot of testing today. It must have something to do with user
    > permissions.
    > If I give administrator-priviliges to the aspnet user and to my domain
    > user
    > (the one I use for impersonation) everything works fine. (I really don't
    > like that).
    >
    > I tried all possible combinations of user priviliges (also all the ones
    > suggested in different newsgroups) but that doesn't solve the problem.
    > I tried filemon and regmon but I could not find any errors.
    > If I disable impersonation everything works fine as well.
    >
    > btw: IIS uses IntegratedWindowsAuthentication and AnonymousAuthentication
    > but I tried all possible combinations. No success.
    >
    > Do you have any other suggestions ?
    >
    > Regards,
    >
    > Sven-Torben
    >
    > "lelteto" <> schrieb im Newsbeitrag
    > news:...
    >> Can you check if the algorithm used is AES? That would explain your

    > problem.
    >> The MS CSP handling AES is not by default installed on Windows 2000 -
    >> although you CAN install it (that's why on some computers it works). It
    >> is
    >> installed on Windows XP. If this is, in fact, your problem you can solve

    > it
    >> in two ways:
    >> 1. Make sure the AES CSP is installed on your target machines
    >> 2. or switch to Triple-DES as algorithm.
    >>
    >> Laszlo Elteto
    >> SafeNet, Inc.
    >>
    >> "Sven-Torben Janus" wrote:
    >>
    >> > I'm running an ASP.NET webapplication on a Windows 2000 Server SP4

    > machine
    >> > with .Net Framework 1.0 installed.
    >> >
    >> > The ASP.Net application uses impersonation (windows domain account).

    > This is
    >> > needed for communication between two servers (some ldap stuff).
    >> > Furthermore the application uses FormsAuthentication. At some point the
    >> > FomrAuthentication.Decrypt method is called. At this point I get the
    >> > following error:
    >> >
    >> >
    >> > Cryptographic service provider (CSP) could not be found for this

    > algorithm.
    >> > Description: An unhandled exception occurred during the execution of
    >> > the
    >> > current web request.
    >> > Please review the stack trace for more information about the error and

    > where
    >> > it originated in the code.
    >> >
    >> > Exception Details:
    >> > System.Security.Cryptography.CryptographicException:
    >> > Cryptographic service provider (CSP) could not be found for this

    > algorithm.
    >> >
    >> > Source Error:
    >> > An unhandled exception was generated during the execution of the
    >> > current

    > web
    >> > request. Information regarding the origin and location of the exception

    > can
    >> > be identified using the exception stack trace below.
    >> >
    >> > Stack Trace:
    >> >
    >> > [CryptographicException: Cryptographic service provider
    >> > (CSP) could not be found for this algorithm.]
    >> >
    >> > System.Security.Cryptography.DESCryptoServiceProvider..ctor() +239
    >> > System.Web.Security.FormsAuthentication.Initialize() +242
    >> > System.Web.Security.FormsAuthenticationModule.OnEnter(Object source,
    >> > EventArgs eventArgs) +146
    >> > System.Web.SyncEventExecutionStep.Execute() +60
    >> > System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
    >> > completedSynchronously) +87
    >> >
    >> >
    >> >
    >> >
    >> > The application runs fine on another Win2K SP4 machine and also on some
    >> > other WinXP machines.
    >> > I tried to install the Windows 2000 High Encryption Package. But that

    > didn't
    >> > solve the problem.
    >> > The error doesn't occur when I turn impersonation off. But the

    > application
    >> > needs impersonation so this is no solution.
    >> >
    >> > So what to do ?
    >> > I searched msdn and the internet but I couldn't find anything that

    > solves
    >> > the problem.
    >> >
    >> > Any help is appreciatet.
    >> >
    >> > Thanks in advance.
    >> >
    >> > Sven-Torben
    >> >
    >> >
    >> >

    >
    >
    Daniel Sie [MSFT], Sep 10, 2004
    #3
  4. Re: Cryptographic service provider (CSP) could not be found for this a

    What do you mean by "the user profile need to be loaded" ?
    How can I test this ? And why works everything fine when the ASPNET user has
    administrator priviliges ?

    Regards,

    Sven-Torben


    "Daniel Sie [MSFT]" <> schrieb im Newsbeitrag
    news:...
    > I doubt this has anything to do with privileges. May be the user profile
    > need to be loaded.
    >
    > --
    > Thanks,
    >
    > Daniel Sie [MSFT]
    >
    > This posting is provided "AS IS" with no warranties, and confers no

    rights.
    > "Sven-Torben Janus" <> wrote in message
    > news:...
    > > Hello,
    > >
    > > thanks for your reply.
    > >
    > > It does not seem to be the algorithm.
    > > I did a lot of testing today. It must have something to do with user
    > > permissions.
    > > If I give administrator-priviliges to the aspnet user and to my domain
    > > user
    > > (the one I use for impersonation) everything works fine. (I really don't
    > > like that).
    > >
    > > I tried all possible combinations of user priviliges (also all the ones
    > > suggested in different newsgroups) but that doesn't solve the problem.
    > > I tried filemon and regmon but I could not find any errors.
    > > If I disable impersonation everything works fine as well.
    > >
    > > btw: IIS uses IntegratedWindowsAuthentication and

    AnonymousAuthentication
    > > but I tried all possible combinations. No success.
    > >
    > > Do you have any other suggestions ?
    > >
    > > Regards,
    > >
    > > Sven-Torben
    > >
    > > "lelteto" <> schrieb im Newsbeitrag
    > > news:...
    > >> Can you check if the algorithm used is AES? That would explain your

    > > problem.
    > >> The MS CSP handling AES is not by default installed on Windows 2000 -
    > >> although you CAN install it (that's why on some computers it works). It
    > >> is
    > >> installed on Windows XP. If this is, in fact, your problem you can

    solve
    > > it
    > >> in two ways:
    > >> 1. Make sure the AES CSP is installed on your target machines
    > >> 2. or switch to Triple-DES as algorithm.
    > >>
    > >> Laszlo Elteto
    > >> SafeNet, Inc.
    > >>
    > >> "Sven-Torben Janus" wrote:
    > >>
    > >> > I'm running an ASP.NET webapplication on a Windows 2000 Server SP4

    > > machine
    > >> > with .Net Framework 1.0 installed.
    > >> >
    > >> > The ASP.Net application uses impersonation (windows domain account).

    > > This is
    > >> > needed for communication between two servers (some ldap stuff).
    > >> > Furthermore the application uses FormsAuthentication. At some point

    the
    > >> > FomrAuthentication.Decrypt method is called. At this point I get the
    > >> > following error:
    > >> >
    > >> >
    > >> > Cryptographic service provider (CSP) could not be found for this

    > > algorithm.
    > >> > Description: An unhandled exception occurred during the execution of
    > >> > the
    > >> > current web request.
    > >> > Please review the stack trace for more information about the error

    and
    > > where
    > >> > it originated in the code.
    > >> >
    > >> > Exception Details:
    > >> > System.Security.Cryptography.CryptographicException:
    > >> > Cryptographic service provider (CSP) could not be found for this

    > > algorithm.
    > >> >
    > >> > Source Error:
    > >> > An unhandled exception was generated during the execution of the
    > >> > current

    > > web
    > >> > request. Information regarding the origin and location of the

    exception
    > > can
    > >> > be identified using the exception stack trace below.
    > >> >
    > >> > Stack Trace:
    > >> >
    > >> > [CryptographicException: Cryptographic service provider
    > >> > (CSP) could not be found for this algorithm.]
    > >> >
    > >> > System.Security.Cryptography.DESCryptoServiceProvider..ctor() +239
    > >> > System.Web.Security.FormsAuthentication.Initialize() +242
    > >> > System.Web.Security.FormsAuthenticationModule.OnEnter(Object

    source,
    > >> > EventArgs eventArgs) +146
    > >> > System.Web.SyncEventExecutionStep.Execute() +60
    > >> > System.Web.HttpApplication.ExecuteStep(IExecutionStep step,

    Boolean&
    > >> > completedSynchronously) +87
    > >> >
    > >> >
    > >> >
    > >> >
    > >> > The application runs fine on another Win2K SP4 machine and also on

    some
    > >> > other WinXP machines.
    > >> > I tried to install the Windows 2000 High Encryption Package. But that

    > > didn't
    > >> > solve the problem.
    > >> > The error doesn't occur when I turn impersonation off. But the

    > > application
    > >> > needs impersonation so this is no solution.
    > >> >
    > >> > So what to do ?
    > >> > I searched msdn and the internet but I couldn't find anything that

    > > solves
    > >> > the problem.
    > >> >
    > >> > Any help is appreciatet.
    > >> >
    > >> > Thanks in advance.
    > >> >
    > >> > Sven-Torben
    > >> >
    > >> >
    > >> >

    > >
    > >

    >
    >
    Sven-Torben Janus, Sep 10, 2004
    #4
    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. Gabor
    Replies:
    0
    Views:
    518
    Gabor
    Dec 22, 2004
  2. Mike P
    Replies:
    0
    Views:
    2,296
    Mike P
    Mar 12, 2005
  3. Sven-Torben Janus
    Replies:
    1
    Views:
    242
    Svein Terje Gaup
    Sep 15, 2004
  4. Don Nelson
    Replies:
    1
    Views:
    194
    Chris Tanger
    Feb 3, 2005
  5. Kim H
    Replies:
    0
    Views:
    186
    Kim H
    Aug 14, 2006
Loading...

Share This Page