User603616845 posted
Hi,
Here if you want to make your cookie, does not use by anyone ... than you should use encryption.
use this code..
private static void SetEncryptedCookie(string name, string value)
{
var encryptName = SomeEncryptionMethod(name);
Response.Cookies[encryptName].Value = SomeEncryptionMethod(value);
//set other cookie properties here, expiry &c.
//Response.Cookies[encryptName].Expires = ...
}
private static string GetEncryptedCookie(string name)
{
//you'll want some checks/exception handling around this
return SomeDecryptionMethod(Response.Cookies[SomeDecryptionMethod(name)].Value);
}
For more refer this link..
http://www.codeproject.com/Articles/8742/Encrypting-Cookies-to-prevent-tampering
Mark as answer if it will help you.
thanks