Page 1 of 1
Error after modifying connection string
Posted: Thu May 14, 2015 8:40 am
by ImmortalLogic
We have recently upgraded to AbleCommerce 9 but before we did that we waited for the AbleCommerce 10 update. With your help, we were able to get the store installed and access Admin. Yesterday, I accidentally

made a change to the connection string for the database and then could not get back to the admin to log in. You were able to provide a link here:
http://help.ablecommerce.com/mergedProj ... ection.htm to edit the database.config file, replace it with the connection string tag, and include my server and original database information. It still does not work; I cannot return to the Login. I have cleared the broswer cache, restarted IIS, rebooted. Is there anything else that I can try?
Server Error in '/cart' Application is the error we receive.
Re: Error after modifying connection string
Posted: Fri May 15, 2015 3:36 am
by mazhar
Code: Select all
<connectionStrings>
<add name="AbleCommerce" connectionString="Server=YOUR-SERVER;Database=YOUR-DATABASE;Uid=YOUR-USERNAME;Pwd=YOUR-PASSWORD;" providerName="System.Data.SqlClient" />
</connectionStrings>
Your database.config contents should look like above. Where you will have to replace
YOUR-SERVER with actual server name,
YOUR-DATABASE with actual database name,
YOUR-USERNAME with actual user name and finally
YOUR-PASSWORD with actual password. Once the database.config is updated. Recycle the Application Pool/Restart IIS and then try to access the website.
Re: Error after modifying connection string
Posted: Fri May 15, 2015 6:47 am
by ImmortalLogic
I have done this--this includes ensuring the ProviderName= is actually providerName= and recyclying the application pool and restarting IIS. It is not working.
Re: Error after modifying connection string
Posted: Fri May 15, 2015 7:36 am
by mazhar
First make sure custom errors are turned off. In your web.config file you should have mode="Off" in order to disable them.
Code: Select all
<customErrors mode="Off" defaultRedirect="~/Errors/GeneralError.aspx">
Now if you try to open the cart home page it will provide you with detailed error. Can you please post the detailed error you get here? It may provide any hint why its not working.
Re: Error after modifying connection string
Posted: Fri May 15, 2015 8:20 am
by ImmortalLogic
Thanks for your help. Turning off Error Mode redirect helped me resolve the issue. Basically, I needed to insert a space before the word providerName.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: 'providerName' is an unexpected token. Expecting white space. Line 2, position 119.
Source Error:
FROM
Line 1: <connectionStrings>
Line 2: <add name="AbleCommerce" connectionString="Server=Server1;Database=ABCDatabase;Uid=sa;Pwd=123456;"providerName="System.Data.SqlClient" />
Line 3: </connectionStrings>
TO
Line 1: <connectionStrings>
Line 2: <add name="AbleCommerce" connectionString="Server=Server1;Database=ABCDatabase;Uid=sa;Pwd=123456;" providerName="System.Data.SqlClient" />
Line 3: </connectionStrings>