Welcome Guest
(
Login
|
Register
)
Latest Posts
Popular Topics
Home
Search
Tags
Members
Home
»
Kartris ASP.NET Ecommerce Software
»
Kartris technical issues
»
UPS error - connection closed on send
UPS error - connection closed on send
Posted By
SAbow
Mon 22 Jan 2018
0
POST REPLY
LIKE
1,865
1
Answer
UPS error - connection closed on send
Flat Ascending
Flat Descending
Threaded
Topic View
Add To Favorites
Print This Topic
Goto Topics Forum
Topic Options
Author
Message
SAbow
Posted Mon 22 Jan 2018
Supreme Being
Group: Forum Members
Last Active: Tue 2 Feb 2021
Posts: 77,
Visits: 334
45,571
Hi,
Just recently began getting this error in a couple of my Kartris sites... (these are hosted on different servers that all have TLS 1.2 already installed on them)
On front of site, says "no shipping available to your destination", but in the log this is the error I see:
"UPS - Error: The underlying connection was closed: An unexpected error occurred on a send."
the config url was recently updated to "
https://onlinetools.ups.com/ups.app/xml/Rate"
due to security updates on ups's api calls. And worked fine for a couple of weeks... now this...
Do you think the code for this call is no longer secure enough (TLS 1.2, etc)?
Please look into this issue ASAP.
Thanks,
Edited
Mon 22 Jan 2018 by
SAbow
REPLY
QUOTE
LIKE
250
mparker
Posted Tue 23 Jan 2018
Supreme Being
Group: Forum Members
Last Active: Thu 25 Jan 2018
Posts: 6,
Visits: 19
3,359
Try putting this within the Application_Start() sub of the Global.asax. This will force Kartris to use TLS 1.2.
Try
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12
Catch
End Try
REPLY
QUOTE
LIKE
264
SAbow
Posted Wed 24 Jan 2018
Supreme Being
Group: Forum Members
Last Active: Tue 2 Feb 2021
Posts: 77,
Visits: 334
45,571
We added the code that you sent, but it's still throwing the same error.Do we need to change the version of .NET (right now it's using version 4.0.30319)?
Do you have a
working
site that ships via UPS that we can look at?
REPLY
QUOTE
LIKE
218
mparker
Posted Thu 25 Jan 2018
Supreme Being
Group: Forum Members
Last Active: Thu 25 Jan 2018
Posts: 6,
Visits: 19
3,359
Hey - We do have a client running Kartris and is successfully using UPS (I can PM you). We were having issues prior to the code change posted above. That's the only change that I made.
Here's a blog post about enabling TLS 1.2:
https://blogs.perficient.com/microsoft/2016/04/tsl-1-2-and-net-support/
. It looks like the newest version of Kartris also has this change now.
We're running .NET v4.0.30319.18051 on Windows Server 2012. You may need to Google if you need to do anything on a server level. Not sure if one of our sys admins did that prior.
Maybe someone from Kartris could shed some light on this?
Edited
Thu 25 Jan 2018 by
mparker
REPLY
QUOTE
LIKE
228
SAbow
Posted Thu 25 Jan 2018
Supreme Being
Group: Forum Members
Last Active: Tue 2 Feb 2021
Posts: 77,
Visits: 334
45,571
After much digging around we finally found a setting that needed to be turned on - now it works with that code that you sent! Thank you so much!!!
REPLY
QUOTE
LIKE
224
Paul
Posted Mon 29 Jan 2018
große Käse
Group: Administrators
Last Active: Tue 10 Sep 2024
Posts: 807,
Visits: 2,748
513,232
I recall that TLS 1.2 support requires ASP.NET 4.5 or above, which the perficient link above confirms too. I wasn't aware that 4.6 defaults to tls 1.2, but that's good news as it should take care of most installations of older Kartris assuming they're putting on ASP.NET updates.
The environment version numbers for the ASP.NET installations are a little misleading. For example
v4.0.30319.42000 looks like it should be ASP.NET 4.0 but it is 4.6.
Microsoft recommends checking the registry to see the .NET version installed:
https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/how-to-determine-which-versions-are-installed
It's a bit of a messy approach. You have to look up DWORD values then look them up in a table to find what .NET version they correspond to.
Microsoft really should have incorporated a simpler way within the app code itself to find what version of .NET it's actually running on, especially as the 4.x branch is very stable now, and code written for 4.5 could be running on 4.5.1, 4.5.2, 4.6, 4.6.1, 4.7, etc. all of which have slight differences and new features which might need to be coded around.
--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.
If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list:
http://bit.ly/19sKMZb
REPLY
QUOTE
LIKE
227
Paul
Posted Fri 9 Feb 2018
große Käse
Group: Administrators
Last Active: Tue 10 Sep 2024
Posts: 807,
Visits: 2,748
513,232
When you say you found a setting, can you clarify where this was? I have another client reporting issues, and the ASP.NET 4.6 setting on its own doesn't seem to address it. Was the setting a kartris one, or somewhere on Windows?
--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.
If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list:
http://bit.ly/19sKMZb
REPLY
QUOTE
LIKE
221
SAbow
Posted Mon 12 Feb 2018
Supreme Being
Group: Forum Members
Last Active: Tue 2 Feb 2021
Posts: 77,
Visits: 334
45,571
The setting that we needed to change was a bit embarrassing actually - I didn't realize that someone had made UPS inactive when this error started coming up, so after
(1) Adding this code to the Application_Start function of global.asax
Try
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12
Catch
End Try
(2) In the backend (Configuration > Payment and Shipping Gateways): changing the UPS URL to
https://onlinetools.ups.com/ups.app/xml/Rate
all I needed to do was turn UPS back on.
REPLY
QUOTE
LIKE
233
POST REPLY
LIKE
1,865
1
Answer
Similar Topics
Reading This Topic
Powered By InstantForum.NET 2012-1 © 2024
Execution: 0.047.
13 queries.
Compression Enabled.