An attempt to attach an auto-named database for file c:\inetpub\wwwroot\WebSite\App_Data\aspnetdb.md

F

Freddie

hi,

i try to get the asp.net 2.0 security controls to work with SQL Server
2005 Dev RTM, this is my connetion string in mashine.config

<connectionStrings>
<add name="LocalSqlServer" connectionString="data
source=.;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User
Instance=false;" providerName="System.Data.SqlClient" />
</connectionStrings>

the aspnet account has sql login w/ administrative rights, this is the
error msg:


[SqlException (0x80131904): An attempt to attach an auto-named database
for file c:\inetpub\wwwroot\WebSite\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.]

the c:\inetpub\wwwroot\WebSite\App_Data\ folder is local, this is new
install of the sql server, there r no databases created after install,
App_Data folder exists and aspnet has full control over it
 
G

Guest

Why atatch the MDF file in the connection string. I would atatch the DB
using the SQL Server Management Studio and then just connect to it using the
connection string.
 
F

Freddie

becouse it`s harder to deploy
Why atatch the MDF file in the connection string. I would atatch the DB
using the SQL Server Management Studio and then just connect to it using the
connection string.

:

hi,

i try to get the asp.net 2.0 security controls to work with SQL Server
2005 Dev RTM, this is my connetion string in mashine.config

<connectionStrings>
<add name="LocalSqlServer" connectionString="data
source=.;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User
Instance=false;" providerName="System.Data.SqlClient" />
</connectionStrings>

the aspnet account has sql login w/ administrative rights, this is the
error msg:


[SqlException (0x80131904): An attempt to attach an auto-named database
for file c:\inetpub\wwwroot\WebSite\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.]

the c:\inetpub\wwwroot\WebSite\App_Data\ folder is local, this is new
install of the sql server, there r no databases created after install,
App_Data folder exists and aspnet has full control over it
 
H

heitai

There are umpteen people who have wasted countless hours over the
message "an attempt to attach an auto-named database........" One reply
has at least a half a dozen fixes, none of which work. Where, pray
tell, is the SQL Server Management Studio. I use Visual Web Management
2005 Express. What do I click to get to the SQL Management Studio. It's
the only approach I haven't tried. Maybe VWM 2005 Express doesn't have
SQL Mgmt Studio.
Many thanks for your help
clickon said:
Why atatch the MDF file in the connection string. I would atatch the DB
using the SQL Server Management Studio and then just connect to it using the
connection string.

Freddie said:
hi,

i try to get the asp.net 2.0 security controls to work with SQL Server
2005 Dev RTM, this is my connetion string in mashine.config

<connectionStrings>
<add name="LocalSqlServer" connectionString="data
source=.;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User
Instance=false;" providerName="System.Data.SqlClient" />
</connectionStrings>

the aspnet account has sql login w/ administrative rights, this is the
error msg:


[SqlException (0x80131904): An attempt to attach an auto-named database
for file c:\inetpub\wwwroot\WebSite\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.]

the c:\inetpub\wwwroot\WebSite\App_Data\ folder is local, this is new
install of the sql server, there r no databases created after install,
App_Data folder exists and aspnet has full control over it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,526
Members
44,997
Latest member
mileyka

Latest Threads

Top