Last Updated: February 25, 2016
·
3.75K
· artfulhacker

The name 'ProtectedData' does not exist in the current context

Using the .net ProtectedData.Protect method is great way to secure in memory data.

However if it isn't obvious and you try to compile but receive this message

The name 'ProtectedData' does not exist in the current context, and The name 'DataProtectionScope' does not exist in the current context

The fix is you need to manually add the System.Security as a reference.