In the end I managed to solve the problem, it's all a matter of writing the connectionString
correctly in Web.config
.
By default it comes as follows:
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-WebApplication1-20180725105224.mdf;Initial Catalog=aspnet-WebApplication1-20180725105224;Integrated Security=True" providerName="System.Data.SqlClient" />
In this case I replaced it with the form that has the connectionString
that creates EntityFramework Code First, which is very similar to this:
<add name="DefaultConnection" connectionString="data source=TuServidorBD;initial catalog=TuBD;integrated security=True;connect timeout=30;encrypt=False;trustservercertificate=False;applicationintent=ReadWrite;multisubnetfailover=False;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
I hope it's helpful