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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:42:38+00:00 2026-05-31T14:42:38+00:00

I was running my application in Visual Studio 2010 Application Server, but now I

  • 0

I was running my application in Visual Studio 2010 Application Server, but now I have changed it to use IIS Local Server, then everything crushed. I am getting following error:

System.Data.SqlClient.SqlException: CREATE DATABASE permission denied in database ‘master’.
An attempt to attach an auto-named database for file D:\Code\EMSApplication\EMSApplication.Web\App_Data\ASPNETDB.mdf
failed. A database with the same name exists, or specified file cannot
be opened, or it is located on UNC share.

I have changed the setting of Application Pool of the Default Web Site of IIS to Classic .NET AppPool.

enter image description here

Also changed the Identity of the Classic .NET AppPool to LocalSystem.

enter image description here

I also set the permission of the NETWORK SERVICE to the Full

enter image description here

The connection string is:

Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.mdf;Integrated Security=True

But none of them worked. I am still getting that error. Any suggestion will be very helpful to me.

Thanks.


I am using SQL Server 2008 Express which comes with the installation of Visual Studio 2010.

  • 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-31T14:42:40+00:00Added an answer on May 31, 2026 at 2:42 pm

    The problem is, pretty clearly, that you already have a database named ASPNETDB attached to that SQL Server instance. My assumption is that the VS development web server is still running, and that is what has the database attached. If so, just shut it down and try an IIS restart, and you should be good. If that doesn’t do it, go and download SSMS Express, connect to your local SQLExpress instance, and try to detach the existing database from there.

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

Sidebar

Related Questions

I have a Visual Studio 2010 Windows Forms application in which I start a
I have a Visual Studio 2010 MVC2 web application that I'm building via the
I am running Visual Studio 2010 (as Admin), IIS 7 on Windows 7 x64.
I have an asp.net application that i am modifying. I setup visual studio 2010
I am running a console application in MS Visual Studio 2010 in Windows 7
I am running Windows 7 Professional 64-bit with visual Studio 2010. I have installed
When running an old MFC application in Visual Studio's debugger I've seen a lot
I have created an OData/WCF service using Visual Studio 2010 on Windows XP SP3
I currently have Parallels installed on my mac book pro. I'm running Visual Studio
I have a web application that runs perfectly fine when I use the Visual

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.