471,066 Members | 1,114 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,066 software developers and data experts.

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

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|aspn etdb.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
Jul 21 '06 #1
3 8474
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" wrote:
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|aspn etdb.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
Jul 21 '06 #2
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.

"Freddie" wrote:

>>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|as pnetdb.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
Jul 21 '06 #3
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 wrote:
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" wrote:
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|aspn etdb.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
Jul 26 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Reshma Prabhu | last post: by
4 posts views Thread by John A. Bailo | last post: by
4 posts views Thread by Dessip | last post: by
2 posts views Thread by windandwaves | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.