Hi
I have a private key that I am storing in a file. As added security I am using
ProtectedData.Protectkey, null, DataProtectionScope.CurrentUser);
Server Error in '/' Application.
The system cannot find the file specified.
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: The system cannot find the file specified.
Source Error:
Line 24:
Line 25: // protect the key
Line 26: key = ProtectedData.Protect(key, null, DataProtectionScope.CurrentUser);
Line 27:
Line 28:
Source File: e:\domains\interactivejapanese.com\wwwroot\mytest101\App_Code\generateEncryption.cs Line: 26
Stack Trace:
[CryptographicException: The system cannot find the file specified.
]
System.Security.Cryptography.ProtectedData.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope) +453
EncryptedPayPal_API_Credentials.generateEncryption.GenerateKey(String targetPath) in e:\domains\interactivejapanese.com\wwwroot\mytest101\App_Code\generateEncryption.cs:26
Encryptor.btn_generate_Click(Object sender, EventArgs e) in e:\domains\interactivejapanese.com\wwwroot\mytest101\Encryptor.aspx.cs:22
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
So I been told I need admin privileges to access what is needed to use protectedData.Scope. So is there nothing in IIS that does the same thing where I do not need these privileges since I can't get admin rights.