Page 1 of 1

Recovering from connection string error

Posted: Wed Nov 05, 2008 1:17 pm
by WylieE
OK. I done gone and broke our test site good.

I uploaded a new version of our SQL database to our co-located web server. During early development, which was done on an in-house box, I was able to change the connection string of the website and toggle between two different databases. One was new and one old.

I just tried doing this on our external site and am getting the following error when attempting to change back to the old database:

Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Requested URL: /Admin/Store/Security/Connection.aspx

I've checked the site and that file is certainly there. Shall I begin a reinstall or is there hope for my recovery? :oops:

This brings up a big question for everyone running live sites and development sites. How are you synchronizing your db changes to your live site?

Re: Recovering from connection string error

Posted: Wed Nov 05, 2008 2:57 pm
by jmestep
Maybe your permissions are wrong on the site?
Dev vs Live site- I don't synch my database changes. I just start out with a dev database that has enough of the real data in it so that I can test out various things, like product display.

Re: Recovering from connection string error

Posted: Wed Nov 05, 2008 3:11 pm
by WylieE
I would be surprised if it were permissions. We've been running the external site for several weeks now and have been testing out performance. I haven't had problems with anything else.

Do you make regular changes/updates to your live site? How do you perform QC testing on your changes?

Re: Recovering from connection string error

Posted: Wed Nov 05, 2008 4:07 pm
by WylieE
Thinking out loud here:

So the connection string is encrypted, otherwise I could theoretically edit the database.config file and reset the connection string. Is there any way to temporarily tell AC *not* to expect an encrypted string and then edit the database.config file?

Re: Recovering from connection string error

Posted: Wed Nov 05, 2008 6:15 pm
by jmestep
I think there is something here in the forum about how to change that encryption, but my brain is a blank right now. It might have been something Joe posted.
On QC for my changes-- I have similar data in my test site so that is where I test. If I'm experimenting with a new type of product setup or something, I set up a similar product in my test site.

Re: Recovering from connection string error

Posted: Thu Nov 06, 2008 6:11 am
by mazhar
You can provide a connection string in following way in database.config

Code: Select all

<connectionStrings>
   <add name="AbleCommerce"
    connectionString="server=yourserver;database=yourdatabase;Integrated Security=true;"
    providerName="System.Data.SqlClient" />
</connectionStrings>

Re: Recovering from connection string error

Posted: Thu Nov 06, 2008 6:28 am
by mazhar
Also please have a look at the following post
viewtopic.php?f=42&t=5747

Re: Recovering from connection string error

Posted: Thu Nov 06, 2008 6:15 pm
by WylieE
mazhar wrote:Also please have a look at the following post
viewtopic.php?f=42&t=5747
This link did the trick. We had to unecrypt the file and then edit the connection string. It's alive!

Thanks so much.