Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/296.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Chilkat RSA加密在Windows7/IIS7中失败_C#_Asp.net_Encryption_Rsa_Chilkat - Fatal编程技术网

C# Chilkat RSA加密在Windows7/IIS7中失败

C# Chilkat RSA加密在Windows7/IIS7中失败,c#,asp.net,encryption,rsa,chilkat,C#,Asp.net,Encryption,Rsa,Chilkat,我开发了一个简单的ASP.NET网站,它使用Chilkatdotnet2(版本9.0.8.0)生成用于加密的RSA公钥/私钥对。下面是示例代码 bool success; string UnlockChilkatRSA = "XXXXXXXXXXXXXX"; int RSAKeyLength = 1024; Chilkat.Rsa rsa = new Chilkat.Rsa(); success = rsa.Un

我开发了一个简单的ASP.NET网站,它使用Chilkatdotnet2(版本9.0.8.0)生成用于加密的RSA公钥/私钥对。下面是示例代码

        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();

当我在WindowsServer2003(IIS6)中托管我的web时,这很有效,但当我尝试在Windows7(IIS7)上托管它时,这行代码
success=rsa.GenerateKey(RSAKeyLength)不工作并导致web冻结。任何人都会遇到同样的问题,如有任何反馈,我们将不胜感激。

我将流程模型标识更改为网络服务,而不是IIS7应用程序池中的默认应用程序池标识,从而解决了此问题。

根据我的经验,Chilkat技术支持的响应速度非常快。也许你可以问他们,他们的控制依赖于什么样的网络服务。