Alex Rivera | Logout

ASP.NET MVC 3 - Unable to find the requested .Net Framework Data Provider

Asked 2011-06-28T14:58:21.440
55

Background-info:

I'm using Microsoft Visual Web Developer 2010 Express.
Info about my (lack of) experience: the problem occured within the first tutorial that I'm trying to work through.

Some additional-info:

  • I'm comfortable with C#, Postgres, Rails (so MVC & Web-apps are not new to me)
  • I have no experience with ASP.NET or SQL Server

Problem Description:

I'm trying to following exactly the steps from the "Intro to ASP.NET MVC 3"-tutorial and I'm running into a problem at the first step from part 5 - Adding the MoviesController:

When I'm trying to add the "MoviesController" with the exact settings that are shown in the tutorial and click 'Add' I get the following error:

"Unable to retrieve metadata for MvcMovie.Models.Movie. Unable to find the requested .Net Framework Data Provider. It may not be installed."

Google gave a ton of results when searching for the phrase "Unable to find the requested .Net Framework Data Provider", but nothing has solved the problem so far.

What I've tried:

I think SQL-Server was not installed so I installed it from the Visual-Studio Express ISO- got an error then I've run a repair from the ISO and it claimed that all 15 points including SQL Server Express repair &.NET 4 Framework went through successfully.

I've run the The_.NET_Framework_Setup_Verification_Tool which succeeded for everything. http://blogs.msdn.com/b/astebner/archive/2008/10/13/8999004.aspx

After the

Edit
Report

2 Answers

0

What I did was in order to overcome the first problem I put in Web.config the code:

 <add name="MovieDBContext"
     connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Movies.sdf;Integrated Security=True"
   providerName="System.Data.SqlClient"/>

Notice I am creating SQL CE 4 database, therefore the .sdf and not .mdf

Next, you should receive another connection errors on the page /Movies, so replace the above code with :

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

And you should be fine.

answered 2012-11-15T16:10:03.500
0

Try this:

<add name="MovieDBContext"
     connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|Movies.sdf;User Instance=true"
     providerName="System.Data.SqlClient" />
answered 2013-05-06T02:06:51.970

Your Answer