views:

52

answers:

1

I developed a simple ASP.NET website that uses Chilkatdotnet2 (version 9.0.8.0) to generate RSA Public/Private Key pair used for encryption. Below is the sample code

        bool success;

        string UnlockChilkatRSA = "XXXXXXXXXXXXXX";
        int RSAKeyLength = 1024;

        Chilkat.Rsa rsa = new Chilkat.Rsa();
        success = rsa.UnlockComponent(UnlockChilkatRSA);
        if (!success)
        {
            lblmsg.Text = "RSA component unlock failed";
            return;
        }
        success = rsa.GenerateKey(RSAKeyLength);
        if (!success)
        {
            lblmsg.Text = rsa.LastErrorText;
            return;
        }
        string publicKey = rsa.ExportPublicKey();
        string privateKey = rsa.ExportPrivateKey();

This works well when I host my web in Windows Server 2003 (IIS6), but when I tried to host it on Windows7 (IIS7), this line of code success = rsa.GenerateKey(RSAKeyLength); doesnt work and cause the web to freeze. Anyone has experience the same issue, any feedback would be appreciated.

A: 

I solved it by changing Process Model Identity to NETWORK SERVICE instead of default ApplicationPoolIdentity in IIS7 Application Pools

chris soe
In my experience, Chilkat tech support is very responsive. Perhaps you could ask them what right NETWORK SERVICE has that their control depends upon.
Steven Sudit