Cannot get to AbleCommerce Site after IIS7 update

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
fatone
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 38
Joined: Thu Jan 17, 2008 7:35 am

Cannot get to AbleCommerce Site after IIS7 update

Post by fatone » Tue Jan 13, 2015 11:22 am

I have an AbleCommerce website and it was hosted on Windows 2003/IIS6, but was moved to Windows 2008/IIS7 by the web hosting company and now it seems I cannot access the site.

I try to get to the Admin area or any other page and get the following:

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: Failed to decrypt using provider 'DataProtectionConfigurationProvider'. Error message from the provider: Key not valid for use in specified state. (Exception from HRESULT: 0x8009000B)

The host company switched the site to run in Classic mode from Integrated. They also stated that this new error is related to an expired or misconfigured AbleCommerce license key.

Can anyone assist me, point me in the right direction. If you could send me to any wikis or guides that I should follow would be appreciated.

Thanks in advance

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

Re: Cannot get to AbleCommerce Site after IIS7 update

Post by jmestep » Wed Jan 14, 2015 4:14 am

The only way the license key would come into the problem is if you are using a different domain name or if you are trying to do an upgrade to a newer build of Able that is not covered by the key. One thing I can think of for you to check has to do with your encryption key/machine key in the web.config file. If you do not have a machineKey set in the web.config file and you move the site to a different server, you need to update your encryption key via the admin. Of course, that only works if you made a backup of it at some time in the past. You can try changing your database connection string in the App_Data/database.config file to a non-encrypted string. a non-encrypted entry in the database.config file would be like this- this is the entire content of the file.
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="AbleCommerce" connectionString="Server=xxx;Database=xxx;Uid=xxx;Pwd=xxx;"
providerName="System.Data.SqlClient" />
</connectionStrings>

You might also need to change the contents of your App_Data/encryption.config file to the following:
<?xml version="1.0" encoding="utf-8"?>
<ablecommerce>
<encryption />

If doing any/all of the above gets the site back up and you had to use any of the methods except restoring the encryption key, you might need to reconfigure your shipping methods and if you view orders in the admin, the charge card info might be gibberish, but it's either that or have a non-functioning site.
</ablecommerce>

If you can't do this, your hosting company should be able to do this for you.
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

fatone
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 38
Joined: Thu Jan 17, 2008 7:35 am

Re: Cannot get to AbleCommerce Site after IIS7 update

Post by fatone » Wed Jan 14, 2015 9:34 am

Thanks jmestep for that info. I looked into the web.config file in the root directory and have attached what I see. There is a machine key set in it. I have attached a screenshot of it below. With this information, should I still do what you suggested or is there another way to fix. Regarding the encryption key, how would I update the key? Is the encryption key stored on server, if so what filename should I be looking for?
DLFWWebsiteError.png

Also, I have attached screenshot of the database.config and encryption.config from my APP_DATA directory
DLFW-database_encryption.config.png
Finally, below is a screenshot of the actual error from the website:
DLFW_ServerError.png

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

Re: Cannot get to AbleCommerce Site after IIS7 update

Post by jmestep » Thu Jan 15, 2015 3:51 am

The fact that you have the machineKey set in the web.config is a good thing so you shouldn't need to change it if it is the same key that was in the web.config on the previous server. I googled this phrase-Key not valid for use in specified state. The first results I looked through had to do with removing a Windows update or fixing registry errors due to Windows update. That is something that your hoster would need to do if it is the problem. If it isn't, I'm out of ideas, so maybe someone at Able can chime in here.
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
mikek
Commander (CMDR)
Commander (CMDR)
Posts: 112
Joined: Wed Oct 15, 2008 9:30 pm
Location: Boston, MA
Contact:

Re: Cannot get to AbleCommerce Site after IIS7 update

Post by mikek » Thu Jan 15, 2015 10:01 am

It seems that they have moved the site over to another server and the database connection string encryption/decryption no longer works.
Replace database.config file on the new server with unencrypted connection string from database_default.config as suggested in Judy's post.
Mike Kolev

Post Reply