database connection could not be opened

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
User avatar
josepha
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 37
Joined: Wed Oct 19, 2011 1:23 am
Contact:

database connection could not be opened

Post by josepha » Mon Jan 30, 2012 5:56 am

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 ?? :(

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: database connection could not be opened

Post by jmestep » Mon Jan 30, 2012 8:31 am

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?
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
josepha
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 37
Joined: Wed Oct 19, 2011 1:23 am
Contact:

Re: database connection could not be opened

Post by josepha » Mon Jan 30, 2012 9:30 am

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 ?
Never leave for tomorrow what you can do today.

User avatar
josepha
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 37
Joined: Wed Oct 19, 2011 1:23 am
Contact:

Re: database connection could not be opened

Post by josepha » Mon Jan 30, 2012 12:52 pm

by the way, I am using windows 7 pro, not windows server " It does not matter i think " !!

Some One Help please ? :?
Never leave for tomorrow what you can do today.

User avatar
josepha
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 37
Joined: Wed Oct 19, 2011 1:23 am
Contact:

Re: database connection could not be opened

Post by josepha » Tue Jan 31, 2012 2:52 am

The specified database connection could not be opened.

Connection String: Data Source=.\SQLExpress;Integrated Security=True;AttachDbFileName=|DataDirectory|\AbleCommerce.mdf;User Instance=true;


HELP !! :(
Never leave for tomorrow what you can do today.

User avatar
dgoranov
Lieutenant (LT)
Lieutenant (LT)
Posts: 55
Joined: Sun Jan 16, 2011 3:58 pm
Location: Boston, MA
Contact:

Re: database connection could not be opened

Post by dgoranov » Tue Jan 31, 2012 3:17 am

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.
Dimi Goranov
Drundo Software Inc.
AbleCommerce Hosting and Management
Email: dgoranov@drundo.com
Ph: 888.464.2140

User avatar
josepha
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 37
Joined: Wed Oct 19, 2011 1:23 am
Contact:

Re: database connection could not be opened

Post by josepha » Tue Jan 31, 2012 4:24 am

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>
Never leave for tomorrow what you can do today.

User avatar
josepha
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 37
Joined: Wed Oct 19, 2011 1:23 am
Contact:

Re: database connection could not be opened

Post by josepha » Tue Jan 31, 2012 4:40 am

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 ?
Never leave for tomorrow what you can do today.

User avatar
josepha
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 37
Joined: Wed Oct 19, 2011 1:23 am
Contact:

Re: database connection could not be opened

Post by josepha » Tue Jan 31, 2012 4:49 am

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 "
Never leave for tomorrow what you can do today.

User avatar
josepha
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 37
Joined: Wed Oct 19, 2011 1:23 am
Contact:

Re: database connection could not be opened

Post by josepha » Tue Jan 31, 2012 7:36 am

Solved.

I installed SQL server Management Studio Express, and created a new user and database.
* Use supplied SQL Server 2005 database .... Sucks.

:)
Never leave for tomorrow what you can do today.

Post Reply