c# - File.Encrypt() causes IOException The parameter is incorrect -


i have web application when prompted check if there file encryption keys in particular location. if file not present, keys auto-generated , stored within file. afterwards, file supposed encrypted itself.

when run

file.encrypt(keyfilepath);  

it runs ioexception message being "the parameter incorrect".

the operation running impersonation of limited account. when run under own elevated credentials, works perfectly. have checked certificates, created 1 limited account, added account possible roles (cryptography operators, etc.) , tested. nothing worked. in test environment elevated account unreasonable level , perform encrypt operation. afterwards set account usual level , read file perfectly.

the problem cannot ask performed in production once solution final. test environment windows server 2008 data center edition , solution being developed on asp .net mvc 5. please let me know wrong.


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -