久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <i id='FYOeo'><tr id='FYOeo'><dt id='FYOeo'><q id='FYOeo'><span id='FYOeo'><b id='FYOeo'><form id='FYOeo'><ins id='FYOeo'></ins><ul id='FYOeo'></ul><sub id='FYOeo'></sub></form><legend id='FYOeo'></legend><bdo id='FYOeo'><pre id='FYOeo'><center id='FYOeo'></center></pre></bdo></b><th id='FYOeo'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FYOeo'><tfoot id='FYOeo'></tfoot><dl id='FYOeo'><fieldset id='FYOeo'></fieldset></dl></div>
      <bdo id='FYOeo'></bdo><ul id='FYOeo'></ul>
  • <legend id='FYOeo'><style id='FYOeo'><dir id='FYOeo'><q id='FYOeo'></q></dir></style></legend>

    <small id='FYOeo'></small><noframes id='FYOeo'>

      1. <tfoot id='FYOeo'></tfoot>
      2. RSACryptoServiceProvider CryptographicException 系統找不到

        RSACryptoServiceProvider CryptographicException System Cannot Find the File Specified under ASP.NET(RSACryptoServiceProvider CryptographicException 系統找不到 ASP.NET 下指定的文件)

              <legend id='JMxRK'><style id='JMxRK'><dir id='JMxRK'><q id='JMxRK'></q></dir></style></legend>
                <bdo id='JMxRK'></bdo><ul id='JMxRK'></ul>

                <small id='JMxRK'></small><noframes id='JMxRK'>

                <tfoot id='JMxRK'></tfoot>
                • <i id='JMxRK'><tr id='JMxRK'><dt id='JMxRK'><q id='JMxRK'><span id='JMxRK'><b id='JMxRK'><form id='JMxRK'><ins id='JMxRK'></ins><ul id='JMxRK'></ul><sub id='JMxRK'></sub></form><legend id='JMxRK'></legend><bdo id='JMxRK'><pre id='JMxRK'><center id='JMxRK'></center></pre></bdo></b><th id='JMxRK'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='JMxRK'><tfoot id='JMxRK'></tfoot><dl id='JMxRK'><fieldset id='JMxRK'></fieldset></dl></div>
                    <tbody id='JMxRK'></tbody>
                  本文介紹了RSACryptoServiceProvider CryptographicException 系統找不到 ASP.NET 下指定的文件的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有一個使用 RSACryptoServiceProvider 使用已知私鑰(存儲在變量中)解密某些數據的應用程序.

                  I have an application which is making use of the RSACryptoServiceProvider to decrypt some data using a known private key (stored in a variable).

                  當 IIS 應用程序池配置為使用網絡服務時,一切運行正常.

                  When the IIS Application Pool is configured to use Network Service, everything runs fine.

                  但是,當我們配置 IIS 應用程序池以在不同的身份下運行代碼時,我們會得到以下信息:

                  However, when we configure the IIS Application Pool to run the code under a different Identity, we get the following:

                  System.Security.Cryptography.CryptographicException: The system cannot find the file specified.
                  
                     at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
                     at System.Security.Cryptography.RSACryptoServiceProvider.ImportParameters(RSAParameters parameters)
                     at System.Security.Cryptography.RSA.FromXmlString(String xmlString)
                  

                  代碼是這樣的:

                  byte[] input; 
                  byte[] output; 
                  string private_key_xml; 
                  
                  var provider = new System.Cryptography.RSACryptoServiceProvider(this.m_key.Key_Size);
                  provider.FromXmlString(private_key_xml); // Fails Here when Application Pool Identity != Network Service
                  
                  ouput = provider.Decrypt(input, false); // False = Use PKCS#1 v1.5 Padding
                  

                  有一些資源試圖通過說明您應該授予用戶對機器密鑰存儲的讀取權限來回答這個問題 - 但是沒有明確的答案來解決這個問題.

                  There are resources which attempt to answer it by stating that you should give the user read access to the machine key store - however there is no definitive answer to solve this issue.

                  環境:IIS 6.0、Windows Server 2003 R2、.NET 3.5 SP1

                  Environment: IIS 6.0, Windows Server 2003 R2, .NET 3.5 SP1

                  推薦答案

                  確實需要這樣的代碼

                  CspParameters _cpsParameter;
                  RSACryptoServiceProvider RSAProvider;
                  
                  _cpsParameter = new CspParameters();
                  _cpsParameter.Flags = CspProviderFlags.UseMachineKeyStore;
                  
                  RSAProvider = new RSACryptoServiceProvider(1024, _cpsParameter); 
                  

                  以下用戶需要訪問該文件夾:C:Documents and SettingsAll UsersApplication dataMicrosoftCryptoRSAMachineKeys

                  The following users need access to the folder: C:Documents and SettingsAll UsersApplication dataMicrosoftCryptoRSAMachineKeys

                  1. IIS 用戶帳戶(匿名)
                  2. 您在 web.config 設置中用于模擬您的應用程序的用戶帳戶.

                  所以現在它對我來說很好.

                  So now it is working fine for me.

                  這篇關于RSACryptoServiceProvider CryptographicException 系統找不到 ASP.NET 下指定的文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deleting a directory when clicked on a hyperlink with JAvascript.ASP.NET C#(單擊帶有 JAvascript.ASP.NET C# 的超鏈接時刪除目錄)
                  asp.net listview highlight row on click(asp.net listview 在單擊時突出顯示行)
                  Calling A Button OnClick from a function(從函數調用按鈕 OnClick)
                  ASP.net C# Gridview ButtonField onclick event(ASP.net C# Gridview ButtonField onclick 事件)
                  Adding OnClick event to ASP.NET control(將 OnClick 事件添加到 ASP.NET 控件)
                  Multiple submit Button click problem?(多個提交按鈕點擊問題?)

                  1. <legend id='nK0Jf'><style id='nK0Jf'><dir id='nK0Jf'><q id='nK0Jf'></q></dir></style></legend>
                      <bdo id='nK0Jf'></bdo><ul id='nK0Jf'></ul>
                      <tfoot id='nK0Jf'></tfoot>
                          <tbody id='nK0Jf'></tbody>

                        <small id='nK0Jf'></small><noframes id='nK0Jf'>

                      • <i id='nK0Jf'><tr id='nK0Jf'><dt id='nK0Jf'><q id='nK0Jf'><span id='nK0Jf'><b id='nK0Jf'><form id='nK0Jf'><ins id='nK0Jf'></ins><ul id='nK0Jf'></ul><sub id='nK0Jf'></sub></form><legend id='nK0Jf'></legend><bdo id='nK0Jf'><pre id='nK0Jf'><center id='nK0Jf'></center></pre></bdo></b><th id='nK0Jf'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='nK0Jf'><tfoot id='nK0Jf'></tfoot><dl id='nK0Jf'><fieldset id='nK0Jf'></fieldset></dl></div>
                            主站蜘蛛池模板: 久久久久久www| www久久av| 青青草一区 | 美女日批免费视频 | 激情综合五月 | 国产亚洲欧美在线 | 久久黄网 | 一二三区av | 人人看人人爽 | 亚洲高清av| 毛片av免费看 | 日韩一区二区在线看 | 91视频在线观看 | 精品国产乱码久久久久久88av | 欧美一极视频 | 国精产品一品二品国精在线观看 | 特黄一级 | 免费黄色网址视频 | 精品久久久久久久久久久久久 | 嫩草视频入口 | 国产在线观看不卡一区二区三区 | 亚洲综合二区 | 自拍视频网站 | 国产精产国品一二三产区视频 | 国产伦精品一区二区三毛 | 国产原创在线观看 | 特级黄色毛片 | 中国一级大黄大片 | 国产h在线 | 成人在线观看免费 | 亚洲精品视频三区 | 中文字幕欧美一区 | 亚洲永久| 欧美一区二区三区在线观看 | 久久久久久久久国产成人免费 | 成人在线不卡 | 精品久久久久久久久久久久久久 | 亚洲高清av在线 | 日韩中文一区 | 狠狠骚| 成人在线观看免费视频 |