Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8059321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:38:19+00:00 2026-06-05T09:38:19+00:00

I upgraded my PC from Windows 7 to Windows 8 yesterday, so now I’m

  • 0

I “upgraded” my PC from Windows 7 to Windows 8 yesterday, so now I’m using Visual Studio 2012, and opening my Visual Studio 2010 project.

This project always worked fine, but it doesn’t work in Visual Studio 2012. I had some weird errors, but I fixed those. Now I’m left with one error that I just can’t fix and can’t find anything about on Google:

I get this exception:

Failed to set Database.DefaultConnectionFactory to an instance of the ‘System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework’ type as specified in the application configuration. See inner exception for details.

With the following innerexception:

Constructor on type ‘System.Data.Entity.Infrastructure.SqlConnectionFactory’ not found.

My Web.Config looks pretty standard:

  <connectionStrings>
    <add name="DefaultConnection" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=aspnet-WebUI-201253192737;Integrated Security=True" providerName="System.Data.SqlClient" />
  </connectionStrings>

  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="Data Source=.\SQLEXPRESS; Integrated Security=True; MultipleActiveResultSets=True" />
      </parameters>
    </defaultConnectionFactory>
  </entityFramework>

The SqlConnectionFactory class exists and it has 2 constructors (one parameterless, and one that takes a connection string). I tested that by creating a SqlConnectionFactory in my C# code.

I already deleted Entity Framework and reinstalled it, but that didn’t solve the problem.

I’m using Entity Framework 5.0 RC (which worked fine in VS2010 as stated before) with SQL Server 2012 + Tools and IIS express.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T09:38:22+00:00Added an answer on June 5, 2026 at 9:38 am

    I fixed the problem. I changed this:

      <entityFramework>
        <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
          <parameters>
            <parameter value="Data Source=.\SQLEXPRESS; Integrated Security=True; MultipleActiveResultSets=True" />
          </parameters>
        </defaultConnectionFactory>
      </entityFramework>
    

    To:

      <entityFramework>
        <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
      </entityFramework>
    

    And now it works. A bit stupid though, I’d like to supply the connection string as a parameter.

    I found this out by creating a new MVC 4 project with entity framework in VS 2012, and comparing the Web.Config files. I noticed another difference.

    My Entity Framework assembly has version 4.4.0.0 (although I installed the 5.0 RC from NuGet). The new project that I created has an assembly with version 5.0.0.0. Can anyone explain that?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using NetBeans 6.8 on Windows 7. I upgraded from WinXP and NetBeans 6.7.
I recently upgraded from jQuery 1.2.6 to 1.3.2 Now on the page I'm using
We just upgraded our Visual Studio 2008 projects to Visual Studio 2010. All of
We've recently upgraded from Visual SourceSafe to SVN based on recommendations on this site.
I just upgraded my Windows Forms project from .NET 3.0 to .NET 3.5 and
I recently upgraded my computer from XP to Windows Seven. I was using IIS
I have been using the customer preview of Visual Studio 2012 up until day
I have just upgraded from EF 4.0.0 to EF 4.3.1. I am using Visual
Using NuGet I upgraded all the NServiceBus references in a project from 3.0.3 to
Fairly exotic it seems to me. We recently upgraded/migrated from Windows Server 2003 to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.