I am trying to query records and collect them in a Set as below

Set&lt;abc__c&gt; a = [select id from abc__c limit 2];


but getting the following error Illegal assignment from LIST to SET.Can't I collect the result of a query in Set ?


Question: Code to create a security token isn't working
Answer: yeah i have seen this before as well, and it has hit me in production as well ;-)

Are you using ProtectedData in .NET to encrypt passwords? http://msdn.microsoft.com/en-us/library/system.security.cryptography.protecteddata.unprotect.aspx

my guess is that you are seeing this now because your production environment is multi-server, and your development environment is single server. Encryption works fine with machine key as long as you are on a single server, but it breaks when you run on several servers.