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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T16:15:58+00:00 2026-05-12T16:15:58+00:00

I’ve been experimenting with ASP.Net MVC, and have come across a problem that is

  • 0

I’ve been experimenting with ASP.Net MVC, and have come across a problem that is probably not specifically MVC related. But I cannot get the authentication in the default MVC application (the one created by the wizard when you create a new MVC project) to work properly under IIS 7 on Windows 7.

If I run under the Visual Studio environment, it works, but if I switch the settings to run under IIS instead, I get the following exception trying to submit the login or registration:

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.

I believe that this is because the website runs under my own account in Visual Studio, but under the IUSR account in IIS. Google searches on the exception message have been unhelpful so far.

So, can one create a local user profile for the IUSR account? If so, how? Is there something else I should be doing to get the SQLExpress engine to work under the anonymous account in IIS 7?

I also tried configuring the IIS website to use my account, but since this is my home machine, my account doesn’t have a password, and it appears that IIS won’t let a website be configured to use an account without a password. Or, since this is my first experience with IIS 7, and configuration feels very different than IIS 5/6, I am just missing the right setting that will let me configure the account to use for anonymous access.

EDIT: Some additional information. If I empty the App_Data folder and try again from IIS, SQLExpress attempts to create my database and fails, but the exception message has further information with the following suggestions.

SQLExpress database file auto-creation
error:

The connection string specifies a
local Sql Server Express instance
using a database location within the
applications App_Data directory. The
provider attempted to automatically
create the application services
database because the provider
determined that the database does not
exist. The following configuration
requirements are necessary to
successfully check for existence of
the application services database and
automatically create the application
services database:

  1. If the applications App_Data directory does not already exist, the
    web server account must have read and
    write access to the applications
    directory. This is necessary because
    the web server account will
    automatically create the App_Data
    directory if it does not already
    exist.
  2. If the applications App_Data directory already exists, the web
    server account only requires read and
    write access to the applications
    App_Data directory. This is necessary
    because the web server account will
    attempt to verify that the Sql Server
    Express database already exists within
    the applications App_Data directory.
    Revoking read access on the App_Data
    directory from the web server account
    will prevent the provider from
    correctly determining if the Sql
    Server Express database already
    exists. This will cause an error when
    the provider attempts to create a
    duplicate of an already existing
    database. Write access is required
    because the web server accounts
    credentials are used when creating the
    new database.
  3. Sql Server Express must be installed on the machine.
  4. The process identity for the web server account must have a local user
    profile. See the readme document for
    details on how to create a local user
    profile for both machine and domain
    accounts.

I’ve pretty extensively confirmed that the first three suggestions have been satisfied. The fourth seems to be the cause of my problems, but I can’t figure out how to do that. And although the suggestion claims there is a readme document that describes it, I have not been able to find that document.

  • 1 1 Answer
  • 1 View
  • 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-12T16:15:58+00:00Added an answer on May 12, 2026 at 4:15 pm

    I got this problem as well running under medium trust. The process that creates the database requires at least High trust. You can check this by looking in your Web.Config for

    <trust level="TrustLevel" />
    

    If there is no trust specified in your Web.Config, try adding it and set it to either Full or High. If this doesn’t work, there is a machine.config in your IIS which you would need to modify.

    That being said, the best route I have found to solve this is to just use aspnet_regsql.exe to create the necessary tables and then change the connection string in your Web.Config to look at it directly.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I need a function that will clean a strings' special characters. I do NOT
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,

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.