logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
gdelorey2939345  
#1 Posted : Wednesday, December 15, 2021 5:38:23 PM(UTC)
gdelorey2939345

Rank: Member

Groups: Authorized User, Developers, Registered
Joined: 11/2/2021(UTC)
Posts: 12

Hello -

About a month ago, I migrated an AC Gold R10 site to a new web server, but the database server remained the same. I somehow forgot to restore the encryption key, so I ended up manually re-adding the Payment settings for PayPal and everything seems to be working great since then. Today, the client requested we re-enable UPS 3-day shipping (it was set to Admins only) however it seems as though the UPS User/Key information gets stored in the encryption key and so I'm unable to use that service.

1) Tried deleting UPS as a carrier and re-adding, however, the page errors out when trying to open the License page at https://www.site.com/adm...viders/UPS/License.aspx. The error is:

An error has occured at https://www.site.com/Adm...oviders/UPS/License.aspx
Exception: Exception of type 'System.Web.HttpUnhandledException' was thrown.Stack Trace: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) Inner Exception: The 'br' start tag on line 9 position 31 does not match the end tag of 'H2'. Line 10, position 3.Inner Exception Stack Trace: at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag) at System.Xml.XmlTextReaderImpl.ParseEndElement() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at System.Xml.XmlDocument.Load(XmlReader reader) at System.Xml.XmlDocument.LoadXml(String xml) at CommerceBuilder.Shipping.Providers.UPS.UPS.SendRequestToProviderWithoutCredentials(XmlDocument request, String url) at CommerceBuilder.Shipping.Providers.UPS.UPS.GetAgreement(String countryCode, String languageCode) at CommerceBuilder.Shipping.Providers.UPS.UPS.GetAgreement() at AbleCommerce.Admin.Shipping.Providers._UPS.License.Page_Load(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

2) When searching for this error, I see two forum posts relating to a hot patch for R9/R10 to fix a similar issue (http://forums.ablecommerce.com/viewtopic.php?t=19365), as well as an updated URL for UPS rates (http://forums.ablecommerce.com/viewtopic.php?t=19373). Both changes have been implemented and the error persists. I would figure, at the least, I could remove UPS and start from scratch, but this error is preventing that.

3) The old web server is online, so I used my hosts file to point back to it. I can see the UPS account information when I view the Carrier setup page, so that is good. I also have a backup (or can create a new one) of the encryption key on that server. Is it safe to then restore that encryption key to the new server? I haven't made any other payment/shipping related changes on the new box - simply restored what was already setup on the former server. We do capture payments immeidately from PayPal, but not sure if this restore would affect our ability to refund/adjust payments since the move. The only reason I'm considering a restore of the key is that the UPS setup page is erroring out and I need to get some new shipping services implemented.

Thank you for any assistance you can provide.

Greg

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

shaharyar  
#2 Posted : Thursday, December 16, 2021 5:11:40 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 703

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Hi Greg,

Quote:
Is it safe to then restore that encryption key to the new server?


Yes, you should be able to use the restored encryption key on a new web server.

shaharyar  
#3 Posted : Thursday, December 16, 2021 5:39:26 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 703

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Hi Greg,

On further inspection, we have found that the error you are getting is because of the outdated URL being used in the License Agreement page that appears on a new setup of UPS provider.

In this case, an appropriate solution would be to use the encryption key backup to restore the config data for the UPS provider. It will skip the license agreement page and you would be able to visit the config page.

Otherwise, you would have to update the URL in your GOLD R10 sourcecode. To fix this, please follow the steps:


1- Open file \IntegratedProviders\UPS\UPS.cs

2-Search for line # 265
Code:
XmlDocument providerResponse = UPS.SendRequestToProviderWithoutCredentials(providerRequest, "https://www.ups.com/ups.app/xml/License");


3- Replace with
Code:
XmlDocument providerResponse = UPS.SendRequestToProviderWithoutCredentials(providerRequest, "https://onlinetools.ups.com/ups.app/xml/License");

gdelorey2939345  
#4 Posted : Thursday, December 16, 2021 8:18:54 AM(UTC)
gdelorey2939345

Rank: Member

Groups: Authorized User, Developers, Registered
Joined: 11/2/2021(UTC)
Posts: 12

Thank you! We use the WSP and I don’t believe we have the full source code for this project. Is the file you referenced in the core source code?
gdelorey2939345  
#5 Posted : Thursday, December 16, 2021 8:20:47 AM(UTC)
gdelorey2939345

Rank: Member

Groups: Authorized User, Developers, Registered
Joined: 11/2/2021(UTC)
Posts: 12

Also, if the core source code is required and I need to go the restore encryption key route, should I back up the current working version so I can restore if needed? The site is busy this time of year and I’m a bit worried about changing encryption having not done it.
shaharyar  
#6 Posted : Thursday, December 16, 2021 10:28:03 AM(UTC)
shaharyar

Rank: Advanced Member

Groups: Admin, Developers, Registered, HelpDesk, Authorized User
Joined: 10/5/2018(UTC)
Posts: 703

Thanks: 5 times
Was thanked: 113 time(s) in 112 post(s)
Quote:
Is the file you referenced in the core source code?


Yes, the file is referenced in the core source code. You will need to use the compiled DLL after the code change.

Quote:
should I back up the current working version so I can restore it if needed?


Yes, it is good to take a backup of the working version. Hope it all goes well!

Please let us know if there are any further issues!



Jay  
#7 Posted : Thursday, December 16, 2021 10:47:35 AM(UTC)
Jay

Rank: Member

Groups: Authorized User, Developers
Joined: 11/12/2018(UTC)
Posts: 25

Thanks: 1 times
Was thanked: 4 time(s) in 3 post(s)
If you've deleted UPS on the new server, there won't be any setup information to decrypt there now, even with the old key, correct? And if you restore the old key on the new system which has already been using a different key, won't that mess up the info encrypted with the new key? The text in the Restore Encryption Key section says "When moving an installation to a different server, you will need to restore your encryption key by providing the backup file below. If you have a newer encryption key already set, then the key currently being used will be replaced with the backup resulting in loss of data. Always use the latest key backup when performing a restore."

EDIT: I'm a bit confused, because you said the database server stayed the same and you deleted UPS, but you also say when you go to the old web server you can still see the UPS info. Those two things seem to contradict each other.

Edited by user Thursday, December 16, 2021 11:04:09 AM(UTC)  | Reason: Not specified

Katie S  
#8 Posted : Thursday, December 16, 2021 11:33:53 AM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 421

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
You can try to update the database directly with your UPS configuration by creating a new entry in the ac_ShipGateways table.

ShipGatewayId should be replaced with the actual Id, the config data is in the format below:

UPDATE ac_ShipGateways SETConfigData = 'UseDebugMode=False&
UserId={VALUE}&
Password={VALUE}&
AccessKey={VALUE}&
ShipperNumber={VALUE}&
CustomerType=2&
UseInsurance=False&
UseTestMode=True&
AccountActive=False&
EnablePackageBreakup=True&
MinPackageWeight=0.10&
MaxPackageWeight=150.00&
TestModeUrl=https%3a%2f%2fwwwcie.ups.com%2fups.app%2fxml%2f&LiveModeUrl=https%3a%2f%2fonlinetools.ups.com%2fups.app%2fxml%2f&
TrackingUrl=http%3a%2f%2fwwwapps.ups.com%2fWebTracking%2fprocessInputRequest%3ftracknum%3d%7b0%7d%26AgreeToTermsAndConditions%3dyes&
EnableAddressValidation=False&
AddressServiceTestUrl=https%3a%2f%2fwwwcie.ups.com%2fups.app%2fxml%2fXAV&AddressServiceLiveUrl=https%3a%2f%2fonlinetools.ups.com%2fups.app%2fxml%2fXAV&
EnableLabels=True'
WHERE ShipGatewayId = 3

If you are not planning to upgrade, then purchasing the source code for Gold might be a good idea. That version is nearly 7 years old and has reached its end of life.
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
Jay  
#9 Posted : Thursday, December 16, 2021 11:38:59 AM(UTC)
Jay

Rank: Member

Groups: Authorized User, Developers
Joined: 11/12/2018(UTC)
Posts: 25

Thanks: 1 times
Was thanked: 4 time(s) in 3 post(s)
Katie, that would only work if the OP is not using an encryption key on the new server, or removed encryption before updating, correct?

EDIT: changed "inserting" to "updating".

Edited by user Thursday, December 16, 2021 11:40:56 AM(UTC)  | Reason: Not specified

nadeem  
#10 Posted : Thursday, December 16, 2021 12:20:18 PM(UTC)
nadeem

Rank: Advanced Member

Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System
Joined: 10/11/2018(UTC)
Posts: 109

Thanks: 17 times
Was thanked: 18 time(s) in 18 post(s)
Quote:
Katie, that would only work if the OP is not using an encryption key on the new server, or removed encryption before updating, correct?


Yes, that is correct! Since he has missed to apply the encryption key on the new server, that is why the data isn't being decrypted. As a result, it failed to load the UPS shipping gateway config page due to outdated UPS License URL. When the query above is run to update the encrypted data to decrypted, it will load the config form where he can update the configurations from merchant admin.
nadeem  
#11 Posted : Friday, December 17, 2021 4:15:56 AM(UTC)
nadeem

Rank: Advanced Member

Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System
Joined: 10/11/2018(UTC)
Posts: 109

Thanks: 17 times
Was thanked: 18 time(s) in 18 post(s)
Hi Greg,

If you have already deleted the UPS gateway from the database, then you have to insert new gateway instead of updating. To do so, you have to execute the following query on your database:

Code:

INSERT INTO ac_ShipGateways (StoreId, Name, ClassId, ConfigData, ReCrypt, Enabled)
VALUES (1, 'UPS OnLine® Tools', 'CommerceBuilder.Shipping.Providers.UPS.UPS, CommerceBuilder.UPS', 'UseDebugMode=True&UserId={VALUE}&Password={VALUE}&AccessKey={VALUE}&ShipperNumber={VALUE}&CustomerType=2&UseInsurance=False&UseTestMode=False&AccountActive=False&EnablePackageBreakup=True&MinPackageWeight=0.10&MaxPackageWeight=150.00&TestModeUrl=https%3a%2f%2fwwwcie.ups.com%2fups.app%2fxml%2f&LiveModeUrl=https%3a%2f%2fonlinetools.ups.com%2fups.app%2fxml%2f&TrackingUrl=http%3a%2f%2fwwwapps.ups.com%2fWebTracking%2fprocessInputRequest%3ftracknum%3d%7b0%7d%26AgreeToTermsAndConditions%3dyes&EnableAddressValidation=False&AddressServiceTestUrl=&AddressServiceLiveUrl=', 0, 1)


Make sure to replace the {VALUE} in the query with correct values for UserId, Password, AccessKey and ShipperNumber respectively. This will bypass license agreement page and you will be able to access the UPS configuration page in admin without any issues.

Hope this helps!

Let me know if you have any question(s).

Thank you!
Katie S  
#12 Posted : Friday, December 17, 2021 10:52:13 AM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 421

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
Hi Greg,

If you are not planning to upgrade, then purchasing the source code for Gold might be a good idea. That version is nearly 7 years old and has reached its end of life.

There could be future issues that you might run into and having the source would be very beneficial to you at this point.

If this is something you're interested in, please use the contact form to make a request.

https://www.ablecommerce.com/contactus

We will do our best to offer you a discounted price on the aging product.

Thanks

PS. Our new version does have a direct database upgrade path from Gold.
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
gdelorey2939345  
#13 Posted : Friday, December 17, 2021 11:35:57 AM(UTC)
gdelorey2939345

Rank: Member

Groups: Authorized User, Developers, Registered
Joined: 11/2/2021(UTC)
Posts: 12

Hi all -

Thank you very much for the assistance. Using the scripts provided, we're now back in business with UPS and I'll be working with our client to plan an upgrade for early next year so we can avoid issues like this. Happy Holidays!

Greg
Katie S  
#14 Posted : Friday, December 17, 2021 11:51:16 AM(UTC)
Katie S

Rank: Advanced Member

Groups: System, Administrators, Developers, Registered, HelpDesk
Joined: 10/29/2018(UTC)
Posts: 421

Thanks: 4 times
Was thanked: 34 time(s) in 33 post(s)
Wonderful... Thank you for letting us know!

Merry Christmas and a Happy New Year!
Thanks for your support!

Katie
Secure eCommerce Software and Hosting
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.