Click here to Skip to main content
11,806,818 members (57,753 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: SQL-Server MVC3 Razor
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.

< 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 31-Aug-12 5:25am
Edited 31-Aug-12 8:13am
Wes Aday at 31-Aug-12 11:37am
Try reading through and see if that helps
Ritesh Rana at 31-Aug-12 12:40pm
I have reviewed that but not working for me..

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The connection string you have posted are for plain But I suppose you have EntityFramework. EF's connection string is a little bit more complicated.
Read here about how to build it:[^]
And how to write it:[^]

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

  Print Answers RSS
0 ppolymorphe 245
1 OriginalGriff 150
2 George Jonsson 145
3 CPallini 100
4 Abhinav S 80
0 OriginalGriff 3,380
1 Maciej Los 1,990
2 CPallini 1,915
3 KrunalRohit 1,907
4 ppolymorphe 1,317

Advertise | Privacy | Mobile
Web02 | 2.8.151002.1 | Last Updated 31 Aug 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100