Error after modifying connection string

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
ImmortalLogic
Lieutenant (LT)
Lieutenant (LT)
Posts: 61
Joined: Tue May 11, 2010 9:29 am

Error after modifying connection string

Post by ImmortalLogic » Thu May 14, 2015 8:40 am

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.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Error after modifying connection string

Post by mazhar » Fri May 15, 2015 3:36 am

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.

User avatar
ImmortalLogic
Lieutenant (LT)
Lieutenant (LT)
Posts: 61
Joined: Tue May 11, 2010 9:29 am

Re: Error after modifying connection string

Post by ImmortalLogic » Fri May 15, 2015 6:47 am

I have done this--this includes ensuring the ProviderName= is actually providerName= and recyclying the application pool and restarting IIS. It is not working.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Error after modifying connection string

Post by mazhar » Fri May 15, 2015 7:36 am

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.

User avatar
ImmortalLogic
Lieutenant (LT)
Lieutenant (LT)
Posts: 61
Joined: Tue May 11, 2010 9:29 am

Re: Error after modifying connection string

Post by ImmortalLogic » Fri May 15, 2015 8:20 am

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>

Post Reply