I have tried every solution I have found on stackoverflow but I cannot seem to access a class I created in the App_Data folder.
If I have this class (only showing part of the class):
public class Encryption
{
public string Encrypt(string plainText, string Key)
{
byte[] key = StringToByteArray(Key);
string encrypted = ByteArrayToHexString(encryptStringToBytes_AES(plainText, key, null));
return encrypted;
}
}
I should be able to access it in a code block like:
@{
Encryption enc = new Encryption();
var data = enc.Encrypt("hello", "world");
}
But I get an error that type or namespace "Encryption" cannot be found.
I've also tried to import it with a namespace but can't seem to get my app name to show as a namespace either, seems simpler in asp.net mvc.
I tried all the examples I could find for updating my config file, but to no avail. Is there something I need to do that I'm missing here?