Page 1 of 1
database connection could not be opened
Posted: Mon Jan 30, 2012 5:56 am
by josepha
I am installing AbleCommerce 7.0.7 on local machine, I installed all needed softwares, including SQL express 2005 "tried with SP3 and without".
I choose "Use supplied SQL Server 2005 database" and i get this error:
The specified database connection could not be opened.
Connection String: Data Source=.\SQLExpress;Integrated Security=True;AttachDbFileName=|DataDirectory|\AbleCommerce.mdf;User Instance=true;
I checked SQL server Config. Manager and both SQL server & SQL server Brower is running.
I used windows Authentication while installing the SQL, and i checked " User instances enabled "
I used Chrome & IE, same Error.
snapshot.jpg
What is the Problem ??

Re: database connection could not be opened
Posted: Mon Jan 30, 2012 8:31 am
by jmestep
Is the AbleCommerce.mdf in the App_Data folder? Do you have permissions set correctly for the folder the site is in- Network Service or ASP.net, depending on what version of IIs you are running?
Re: database connection could not be opened
Posted: Mon Jan 30, 2012 9:30 am
by josepha
Yes, the AbleCommerce.mdf file in the App_Data folder.
I am using Local machine:
IIS 6
ASP.net
SQL 2005 SP3
and i installed SQL server management studio express, it may help to configuration if needed.
any Ideas ?
Re: database connection could not be opened
Posted: Mon Jan 30, 2012 12:52 pm
by josepha
by the way, I am using windows 7 pro, not windows server " It does not matter i think " !!
Some One Help please ?

Re: database connection could not be opened
Posted: Tue Jan 31, 2012 2:52 am
by josepha
The specified database connection could not be opened.
Connection String: Data Source=.\SQLExpress;Integrated Security=True;AttachDbFileName=|DataDirectory|\AbleCommerce.mdf;User Instance=true;
HELP !!

Re: database connection could not be opened
Posted: Tue Jan 31, 2012 3:17 am
by dgoranov
The issue seems like database file permission issue. Make sure that the SQL Express instance has has R/W permissions
for App_Data folder. If you are running local Windows 7 Install just grant full permissions to IIS_IUSRS and SQLServerMSSQL Users
on all folders under your Ablecommerce folder.
Re: database connection could not be opened
Posted: Tue Jan 31, 2012 4:24 am
by josepha
Hello,
Can you please tell me how I do that exactly, suppose i want to grand access to everyone,
I don't know what I am doing wrong !
This is my database.config looks like:
<connectionStrings>
<remove name="LocalSqlServer" />
<add connectionString="CONNECTIONSTRING" name="AbleCommerce" providerName="System.Data.SqlClient" />
<add connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" name="LocalSqlServer" providerName="System.Data.SqlClient" />
</connectionStrings>
Re: database connection could not be opened
Posted: Tue Jan 31, 2012 4:40 am
by josepha
I grant access to IIS_IUSRS on Ablecommerce installation folder using my IIS 6.
Sites -> defaults web sites -> "AC" -> right click - edit permissions -> security tab -> edit " full control "
Do I missed anything ?
and how to grant SQLServerMSSQL Users full permissions ?
Re: database connection could not be opened
Posted: Tue Jan 31, 2012 4:49 am
by josepha
Questions:
The Built-in account for both SQL server browser & SQL server (SQLEXPRESS) , must be local system or local service ? " I am choosing local system "
When I install SQL express i select default instance or Named instance : SQLExpress ?? " I am using the second option "
Re: database connection could not be opened
Posted: Tue Jan 31, 2012 7:36 am
by josepha
Solved.
I installed SQL server Management Studio Express, and created a new user and database.
* Use supplied SQL Server 2005 database .... Sucks.
