Using Entity Framework in EC2 gives EntityException
.net, amazon-ec2, amazon-web-services, entity-framework
Solution
There are 2 possible issues: One - Installation of sql client for the entity ADO .net. In my case, although I installed it before fixing the second issue - I don't think it was really missing.. just wanted to make sure.
Two - EC2 firewall (I think this was the issue in my case). - the sql server has to have a rule to allow internal incoming communication on the sql server port. Please note that the external IP address did not work for me - I had to use the sg-XXXX.. set for these rules. (My SQL Server is also hosted in AWS..)
Problem
When trying to run a LINQ query while being hosted in EC2 (AWS) I get: An exception has been raised that is likely due to a transient failure. If you are connecting to a SQL Azure database consider using SqlAzureExecutionStrategy. Same code works on programing environment.