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

  • Home
  • SEARCH
  • 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 6374143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:27:05+00:00 2026-05-25T01:27:05+00:00

I am trying to replicate an example found on MSDN. I am using ASP.NET

  • 0

I am trying to replicate an example found on MSDN. I am using ASP.NET and EF 4.1 (CTP?). I’ve used NuGet to install the EntityFramework package.

I am getting this error: The provider did not return a ProviderManifestToken string …
and the database is never created.

Here is my connection string:

<add name="HospitalContext"
   connectionString=
   "data source=.\SQLExpress;initial catalog=NewTestDB;integrated security=True;"
   providerName="System.Data.SqlClient"/>

Here is my code:

var pat = new Patient { Name = "Shane123132524356436435234" };
db.Patients.Add(pat);

var labResult = new LabResult { Result = "bad", Patient = pat };

int recordAffected = db.SaveChanges();

Here is my context:

public class HospitalContext : DbContext
{
    static HospitalContext()
    {
        Database.SetInitializer(new HostpitalContextInitializer());
    }

    public DbSet<Patient> Patients { get; set; }
    public DbSet<LabResult> LabResults { get; set; }
}

public class HostpitalContextInitializer :
             DropCreateDatabaseIfModelChanges<HospitalContext>
{
    protected override void Seed(HospitalContext context)
    {
        context.Patients.Add(new Patient { Name = "Fred Peters" });
        context.Patients.Add(new Patient { Name = "John Smith" });
        context.Patients.Add(new Patient { Name = "Karen Fredricks" });
    }
}

This is a fully patched SQL 2008 system, with VS 2010 SP1.

  • 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-05-25T01:27:05+00:00Added an answer on May 25, 2026 at 1:27 am

    I was getting this error and tried a few of the earlier suggestions. Then I checked the Inner Exception and noticed I was getting a simple SQL login failure for the user. Just something else to check.

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

Sidebar

Related Questions

I am trying to produce a heat map using ggplot2. I found this example
I am trying to replicate the Navigation Buttons which exist within the ASP.NET Site:
I'm trying to replicate a template I've used before with a member function, and
I am trying to replicate a forum function by getting the last reply of
Recently, I have been getting familiar with PostgreSQL(using 8.2) and found the date_trunc function
I am trying to replicate this using PHP: 2011-03-30;0;0;0;0\n2011-03-30;0;0;0;0\n2011-03-30;0;0;0;0\n2011-03-30;0;0;0;0\n2011-03-30;0;0;0;0\n2011-03-30;0;0;0;0\n2011-03-30;0;0;0;0 Although when I am doing
I'm currently hacking away, trying to replicate Coda's tooltip: http://jqueryfordesigners.com/coda-popup-bubbles/ Check out my example
I'm trying to learn the new ASP .NET MVC framework and would like to
I'm trying to replicate the following exemple : http://www.leigeber.com/2008/04/map-your-users-using-the-google-maps-api-and-php/ How to integrate this PHP
I am trying to replicate the example given by Alex Kuhl on his excellent

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.