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 7052385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:22:36+00:00 2026-05-28T03:22:36+00:00

When I try to run an MVC 2 app on my local IIS 7,

  • 0

When I try to run an MVC 2 app on my local IIS 7, I keep getting this error:

Failed to generate a user instance of SQL Server due to failure in
retrieving the user’s local application data path. Please make sure
the user has a local user profile on the computer. The connection will
be closed.

However, I don’t have anything connected to SQL Server Express, and all my connection strings work fine when I’m running on my localhost.

What is the cause of such an error? How can I prevent it?

  • 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-28T03:22:37+00:00Added an answer on May 28, 2026 at 3:22 am

    ASP.NET applications, including MVC 2 ones, by default create a SQL Server database to store users and roles. The database is called ASPNETDB and is stored in App_Data folder – if it is not there yet, ASP.NET will try to create it when the application starts.

    To create/open this database, User instance of SQL Server Express is used. To start a User Instance the user profile must be loaded for the current user (in this case whatever account the ASP.NET application pool runs as). But the default configuration for IIS application pools is not to load the user profile to limit start time time and save memory.

    To enable loading user profile for an application pool go to its configuration in IIS Manager and look for Load User Profile switch in Advanced Options. Set it to true and it should work.

    If you would rather avoid using User Instances and loading the user profile, you can use a different database for your application’s users and roles. Just go to IIS Manager again, find your Web Site, and look for Connection Strings section in ASP.NET configuration. I bet you will see a connection string called LocalSqlServer there. Just update it to point to the database you want to use. You can see this thread to learn how to create a new ASPNETDB database. If you create it on the main SQL Server instance you will not need the profile to connect to – just create a login in SQL Server and make sure your connection string is using it.

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

Sidebar

Related Questions

If I try to run this query in SQL Server 2005: SELECT 1 WHERE
Whenever i try to run sqlmetal, i get this: 'sqlmetal' is not recognized as
When I try to run the following, I get an error back from ActiveRecord
After converting a Hybrid ASP.NET MVC1 app to MVC2 I'm getting the following error
I try to run ELMAH with my ASP.NET MVC 2 project but have some
During development of an mvc web application, I'm encourtering issues running the local instance
I started porting a simple ASP.NET MVC web app from SQL to RavenDB. I
I'm using Ninject with an MVC app, also using EF4.1 Code First. I'm getting
I have an app built against MVC Preview 3 (referencing local copies of the
I'm deploying a simple asp mvc 2 application on my local IIS 7.5 server.

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.