I had the same problem as the OP, but its solution did not work for me.
This was a problem with the connection string, but not with quotation marks.
Since it took me two days to decide, maybe this will help someone else:
A connection string that works [for my ASP.NET MVC 4.5 / Entity Framework 5.0 application when hosted on Azure (I develop locally with SQL Server 2012, but transfer the database to the Azure SQL database (using the SQL Database Migration Wizard )) . First, I use the database to create my .edmx file (I generate a data model from the database):
<add name="MYPROJECTENTITIES" connectionString="**metadata=**res://*/MODELS.MYPROJECTMODEL.csdl|res://*/MODELS.MYPROJECTMODEL.ssdl|res://*/MODELS.MYPROJECTMODEL.msl;provider=System.Data.SqlClient;provider connection string="Data Source=tcp:B6JD5K5EP4.database.windows.net,1433;Initial Catalog=MYPROJECT_DB;Integrated Security=False;User ID=MYPROJECT@B6JD5K5EP4 ;Password=MYPASSWORDABC123;**MultipleActiveResultSets=True**;Encrypt=True;TrustServerCertificate=False"" providerName="System.Data.EntityClient"/>
Text in UPPERCASE is my Azure info. Obviously, you will need to use your own.
This part of the connection string gave me nightmares, and this may cause your problem too:
res://*/Models.MyProjectModel.csdl|res://*/Models.MyProjectModel.ssdl|res://*/Models.MyProjectModel.msl
These links must be exactly correct. Let me repeat: these links must be exactly correct!
After reading this article from 2008 ("Troubleshooting Entity Framework Connection Strings"), I used the .NET Reflector to look inside MyProjectModel.dll (my .dll name (probably different from your project), as it suggests, and, of course, the connection string (which was automatically created for me by the Entity Framework!) was incorrect. It did not include the prefix. soon when I added Models. prefix (this is how .csdl / .msl / .ssdl are named inside my .dll (rather everything, different from you)), everything worked fine. your .dll and see if the names match. If not, change them to they corresponded to what appeared in the .dll. (Read the article above if what I say is not clear enough.)
Thomas
source share