Click here to Skip to main content
15,883,705 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi to all.

i m not getting the database connetion in mvc 3 using razor
i have created one small application that connects the model to database.
i have set up the connection string of server this works well
but as i changes the connection string to my local server it shows following error.

The provider did not return a ProviderManifestToken string


here i have connection strings first one is of server that creates database on server.

C#
< add name="MoviesContext" connectionstring="Data Source=SERVER\SQL2008;Initial Catalog=Movies;User Id=sa;Password=Admin@101;" providerName="System.Data.SqlClient" >;


< add name="MoviesContext" connectionstring="Data Source=KAUSHAL-PC\SQL2008;Initial Catalog=Movies;">
        providerName="System.Data.SqlClient" >;




thanks in advance..
Posted
Updated 31-Aug-12 8:13am
v3
Comments
[no name] 31-Aug-12 11:37am    
Try reading through http://stackoverflow.com/questions/5423278/ef-4-1-exception-the-provider-did-not-return-a-providermanifesttoken-string and see if that helps
Ritesh Rana 31-Aug-12 12:40pm    
I have reviewed that but not working for me..

1 solution

The connection string you have posted are for plain ado.net. But I suppose you have EntityFramework. EF's connection string is a little bit more complicated.
Read here about how to build it: http://msdn.microsoft.com/en-us/library/bb738533.aspx[^]
And how to write it: http://msdn.microsoft.com/en-us/library/cc716756.aspx[^]
 
Share this answer
 

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

  Print Answers RSS


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