R
R.A.M.
Hello,
I am writing ASP.NET application using SQL Server 2005 Express Edition.
In web.config I have:
<connectionStrings>
<add name="MIM-Magazyn_Demo"
connectionString="Server=.\SQLEXPRESS;AttachDBFileName=|DataDirectory|\MIM-Magazyn_Demo.mdf;Database=MIM-Magazyn_Demo;Trusted_Connection=Yes"
providerName="System.Data.SqlClient"/>
<add name="SqlServices"
connectionString="Server=.\SQLEXPRESS;AttachDBFileName=|DataDirectory|\aspnetdb.mdf;Database=aspnetdb;Trusted_Connection=Yes"/>
</connectionStrings>
I used connection strings syntax from www.connectionstrings.com. I decided
to use AttachDBFileName because I don't expect that application user will
have both databases attached in SQL Server Management Studio.
The problem is that during execution, in a line:
Membership mu = Membership.GetUser();
I receive System.Data.SqlClient.SqlException
{"Cannot create file
'F:\\Inetpub\\wwwroot\\MIM-Magazyn\\App_Data\\aspnetdb_log.LDF' because it
already exists. Change the file path or the file name, and retry the
operation.\r\nCould not open new database 'aspnetdb'. CREATE DATABASE is
aborted.\r\nCould not attach file
'F:\\Inetpub\\wwwroot\\MIM-Magazyn\\App_Data\\aspnetdb.mdf' as database
'aspnetdb'.\r\nFile activation failure. The physical file name
\"F:\\inetpub\\wwwroot\\MIMMagazyn\\App_Data\\aspnetdb_log.LDF\" may be
incorrect."}
Could you help me please to solve the problem?
Thank you!!!
/RAM/
I am writing ASP.NET application using SQL Server 2005 Express Edition.
In web.config I have:
<connectionStrings>
<add name="MIM-Magazyn_Demo"
connectionString="Server=.\SQLEXPRESS;AttachDBFileName=|DataDirectory|\MIM-Magazyn_Demo.mdf;Database=MIM-Magazyn_Demo;Trusted_Connection=Yes"
providerName="System.Data.SqlClient"/>
<add name="SqlServices"
connectionString="Server=.\SQLEXPRESS;AttachDBFileName=|DataDirectory|\aspnetdb.mdf;Database=aspnetdb;Trusted_Connection=Yes"/>
</connectionStrings>
I used connection strings syntax from www.connectionstrings.com. I decided
to use AttachDBFileName because I don't expect that application user will
have both databases attached in SQL Server Management Studio.
The problem is that during execution, in a line:
Membership mu = Membership.GetUser();
I receive System.Data.SqlClient.SqlException
{"Cannot create file
'F:\\Inetpub\\wwwroot\\MIM-Magazyn\\App_Data\\aspnetdb_log.LDF' because it
already exists. Change the file path or the file name, and retry the
operation.\r\nCould not open new database 'aspnetdb'. CREATE DATABASE is
aborted.\r\nCould not attach file
'F:\\Inetpub\\wwwroot\\MIM-Magazyn\\App_Data\\aspnetdb.mdf' as database
'aspnetdb'.\r\nFile activation failure. The physical file name
\"F:\\inetpub\\wwwroot\\MIMMagazyn\\App_Data\\aspnetdb_log.LDF\" may be
incorrect."}
Could you help me please to solve the problem?
Thank you!!!
/RAM/