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

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -