I have a server which configured for SQL Server 2008 R2 and ASP.NET 4.0.
The hosting company won’t support .Net Framework 4.5 and SQL Server 2012 and latest Entity Framework.
I have created my website with .Net Framework 4.5 and latest Entity Framework 5. How can I change the publish settings to old server execute that ?
You need to change the Target Framework for your website.In Visual Studio (with your website project selected) go to Project > Settings. Change Target Framework from .Net Framework 4.5 to .Net 4. Then rebuild all and test your app.
If it’s all working OK you can then publish to your web host as normal.