Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Weird error with accessing db after running aspnet_regsql

$
0
0

Please help me. I wanted to create a website using the built in membership provider. Using VS 2010.

I created a new web project. Created a new, blank database called MasterDemo.mdf in the app_data directory. Went to the VS command prompt and typed in...

C:\Program Files\Microsoft Visual Studio 10.0\VC>aspnet_regsql -A all -C "Data Source=.\SQLEXPRESS;Integrated Security=True;User Instance=True" -d "C:\Users\ROBERT\Documents\Visual Studio 2010\Projects\MasterDemo\MasterDemo\App_Data\MasterDemo.mdf"

This was the result...

Microsoft (R) ASP.NET SQL Registration Tool version 4.0.30319.18408
Administrative utility to install and uninstall ASP.NET features on a SQL server
.
Copyright (C) Microsoft Corporation. All rights reserved.


Start adding the following features:
Membership
Profile
RoleManager
Personalization
SqlWebEventProvider

..

Finished.

In VS I tried to open the database and I got this error.

Database 'C:\Users\Robert\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\C_Users_Robert_Documents_Visual Studio2010_Projects_MasterDemo_MasterDemo_App_Data_MasterDemo.mdf.mdf' already exists. Choose a different database name. An attempt to attach an auto-named database for file C:\Users\Robert\Documents\Visual Studio 2010\Projects\MasterDemo\MasterDemo\App_Data\MasterDemo.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

First, I don't understand the wierd bath in the first sentence. Secondly, why is this happening and why can't I access the database? Thanks!


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>