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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:08:10+00:00 2026-05-14T22:08:10+00:00

I am using SQL Server 2008 Enterprise with VSTS 2008, and I am developing

  • 0

I am using SQL Server 2008 Enterprise with VSTS 2008, and I am developing a simple web application using ASP.Net and Forms Authentication.

When I am using the configuration tool/menu of VSTS of my ASP.Net project (I want to use this tool to manually add some Forms authentication users), I met with the following error (SqlException),

Trying to attach file D:\Projects\MyTest\App_Data\aspnetdb.mdf to automatically named database failed. It may be caused by existing the same name database, or may be caused by specified file can not be opened or caused by the specified file exists in UNC share.

In my computer, there is no aspnetdb.mdf under dir D:\Projects\MyTest\App_Data, and why this dir will be searched? And I have used aspnet_regsql to generate database successfully before I run the configuration tool. Why there is such error? How to fix it?

thanks in advance,
George

  • 1 1 Answer
  • 3 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-14T22:08:11+00:00Added an answer on May 14, 2026 at 10:08 pm

    Have you set up your provider with a named connection?

    <connectionStrings>
      <add name="NamedConnectionString" 
       connectionString="xxxxxxxx" />
    </connectionStrings>
    
     <membership defaultProvider="MembershipADProvider">
      <providers>
        <add
      name="MembershipADProvider"
      type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, 
            Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
                connectionStringName="NamedConnectionString" />
       </providers>
     </membership>
    

    You said that you used aspnet_regsql, which suggests that you are attempting to use the ASP.NET Membership Providers. If you don’t configure the providers and connections in your config, then it will look for a SQL Server Express file called aspnetdb.mdf in the App_Data directory of your site.

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

Sidebar

Related Questions

I am using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 +
I am using .Net 2.0 + SQL Server 2005 Enterprise + VSTS 2008 +
I am using SQL Server 2008 Enterprise + VSTS 2008 + C# + .Net
I am using SQL Server 2008 Enterprise. I have created a very simple test
I am using VSTS 2008 + .Net 3.5 + ASP.Net to develop a simple
I am using VSTS 2008 + C# + .Net 3.5 + ASP.Net + SQL
I am using VSTS 2008 + .Net 3.5 + C# + SQL Server 2008
I am using SQL Server 2008 Enterprise + C# + ADO.Net + .Net 3.5.
Setup: IIS on Windows 2008 Server R2 Enterprise, SQL Server 2008 R2 Enterprise, ASP.NET
I am using Sql Server 2008 R2 Enterprise. I am coding an application capable

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.