Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have uploaded mvc project on server, but i am unble run,
This is my connection string.
add name="FormsEntities2" connectionString="Data Source=hostname;Initial Catalog=database name;User ID=username;Password=password;" providerName="System.Data.SqlClient"

but i am getting this error,
"Code generated using the T4 templates for Database First and Model First development may not work correctly if used in Code First mode. To continue using Database First or Model First ensure that the Entity Framework connection string is specified in the config file of executing application. To use these classes, that were generated from Database First or Model First, with Code First add any additional configuration using attributes or the DbModelBuilder API and then remove the code that throws this exception"

if anybody knows please help me.
Thanks in advance.
Posted
Updated 15-Nov-17 22:13pm
v3

1 solution

This problem has been answered quite thoroughly over here[^]

also I think you should go through Don’t use Code First by mistake[^]
 
Share this answer
 
v2
Comments
Maciej Los 13-Feb-15 10:03am    
+5!
Mukesh Patil 14-Feb-15 0:13am    
Thanks
Mukesh Patil 14-Feb-15 1:19am    
I read that link and did same what they have told, even i am getting same error on server side, this connection string works fine at local machine, But giving error on server

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900