0

I am trying to learn MVC3 from the tutorial in www.asp.net/mvc/tutorials Everything was working fine till i reach this step Here after whenever i try to create a controller file under Controller folder i am getting error as displayed in following link: click this to see the error message


My Connection Sting is as follows:
<connectionStrings> <add name="conString" connectionString="data source=localhost;initial catalog=ShrathSample;uid=sa;pwd=admin123" providerName="System.Data.SqlClient"/> <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> </connectionStrings>
I couldn't find the correct solution. Please somebody help to get out of this error or suggest me a simple tutorial to learn MVC easily.

Thanks in advance.

shary.sharath
  • 649
  • 2
  • 14
  • 29

1 Answers1

0

Replace following connection string

<add name="MovieDBContext"     connectionString="Data Source=|DataDirectory|Movies.sdf"
providerName="System.Data.SqlServerCe.4.0"/>

with the following

<add name="MovieDBContext"
     connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;database=Movies;User ID=sa;password="
     providerName="System.Data.SqlClient"/>

for more information check out :-

Add Controller in MVC4 not working

Error when creating a Controller in Visual Studio 2012

Community
  • 1
  • 1
Neel
  • 11,625
  • 3
  • 43
  • 61