The underlying connection was closed the connection was closed unexpectedly
Перейти к содержимому

The underlying connection was closed the connection was closed unexpectedly

  • автор:

error: The underlying connection was closed: An unexpected error occurred on a send

This has happened suddenly without any change by my side of the script configuration.

I also can read in Resource Integrity: Not possible to determine the status of integrity of the resource Cognitive Services at the moment.

I am wondering if this relates to a known Microsoft Azure issue or if I should do any fix on my side.

Azure AI Search

An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.

671 questions
Sign in to follow
Azure Translator
An Azure service to easily conduct machine translation with a simple REST API call.
335 questions
Sign in to follow

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

10,128 questions
Sign in to follow
.NET Runtime

.NET: Microsoft Technologies based on the .NET software framework. Runtime: An environment required to run apps that aren’t compiled to machine language.

1,113 questions
Sign in to follow
Azure AI services

A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.

2,321 questions
Sign in to follow
3 comments Hide comments for this question Report a concern
I have the same question 1 vote
Dan Granger 6 Reputation points
2021-04-19T15:28:23.84+00:00
We’re getting the same issue on calls to an O365 Sharepoint site.
1 vote Report a concern
GiftA-MSFT 11,146 Reputation points
2021-04-19T18:21:14.097+00:00

Hi, thanks for reaching out. Are you using a global, regional, or multi-service resource to authenticate? If using a regional resource, can you please share the region?

0 votes Report a concern
Prasath, Siva 1 Reputation point
2021-09-22T14:50:28.517+00:00

I I have tried adding the below ones but still I’m getting the same error. I have tried adding at the beginning / Just the line before ExecuteQuery() but no luck. I’m invoking the SharePoint Online using the ClientContext. I’m using .NET framework 4.7.2. Let me know if I’m missing something? System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; System.Net.ServicePointManager.SecurityProtocol |= System.Net.SecurityProtocolType.Tls12;

0 votes Report a concern

3 answers

Sort by: Most helpful
Most helpful Newest Oldest
Stephen 11 Reputation points
2021-04-19T20:28:03.687+00:00

After MS support pointed us in the direction of TLS, adding the following line fixed the error for us:

System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12; 

Still don’t understand why after years of working fine today was the day it needed to be changed. Edit: While the above definitely fixed the error, the line we ended up using was:
System.Net.ServicePointManager.SecurityProtocol |= System.Net.SecurityProtocolType.Tls12;

9 comments Show comments for this answer Report a concern
Francesco Giorgio 11 Reputation points
2021-04-19T20:23:27.957+00:00

The resource to authenticate is Global. The error happens when calling the following API:
https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=it&to=DE&to=EN&to=FR&to=ES&to=NL and precisely when calling this method: System.Net.HttpWebRequest.GetResponse() “Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host” Stack Trace: in System.Net.HttpWebRequest.GetResponse() Inner exception:
in System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
in System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count) Error code: 10054
SocketErrorCode: ConnectionReset System.Net.Sockets.SocketError

1 vote Report a concern
Francesco Giorgio 11 Reputation points
2021-04-20T05:53:34.67+00:00

Thank you Stephen, I had to adapt this fix to .net framework, but it worked also!
Thank you very much for sharing. I agree I can’t believe they suddenly have deprecated previous TLS versions, without any warning.

The underlying connection was closed the connection was closed unexpectedly

This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.

Don’t miss Flexera’s first Technology Intelligence Summit this month! For more information click here.

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for
Show only | Search instead for
Did you mean:

  • Flexera Community
  • :
  • Data Platform
  • :
  • Data Platform Forum
  • :
  • Re: underlying connection was closed the connection was closed unexpectedly error in BDNA Technopedi.
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Subscribe
  • Mute
  • Printer Friendly Page

underlying connection was closed the connection was closed unexpectedly error in BDNA Technopedia

  • Mark as New
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content
  • Mark as New
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

We are facing issue in BDNA Technopedia sync. Below error is coming.

underlying connection was closed the connection was closed unexpectedly

Please help to resolve this issue on priority.

‎May 30, 2022 12:35 AM

  • All forum topics
  • Previous Topic
  • Next Topic
  • Mark as New
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

By ChrisG

Community Manager

  • Mark as New
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

A message » underlying connection was closed the connection was closed unexpectedly» would commonly indicate that something in between your BDNA server and the download site has interrupted or disallowed the network connection. For example, network routing may not be allowing your BDNA server to access the Internet.

So check with your network administrators whether the BDNA server has connectivity to the Internet. If that is not possible or not desirable, you may want to consider manually doing doing an «offline» synchronization along the lines of what is described on the following page: Synchronizing Offline

(Did my reply solve the question? Click «ACCEPT AS SOLUTION» to help others find answers faster. Liked something? Click «KUDO». Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

Error: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send!

Error: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send!

Error: «The underlying connection was closed: An unexpected error occurred on a send.» when querying Monitoring Service’s OData endpoint

Symptoms or Error

Recent Cloud supports only TLS 1.2 and above, all the clients who are accessing any data from Azure/Citrix Services with TLS versions 1.0 and 1.1 will end up getting the following error.

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host 

Solution

To fix this issue, enforce use of TLS 1.2 on the client machine. Add the following registry entries, so the clients such as MS Excel, PowerShell, LinqPad use TLS 1.2 by default.

Caution! Using Registry Editor incorrectly can cause serious problems that might require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk. Be sure to back up the registry before you edit it.

Please follow the below mentioned steps depending on your platform.

Windows Server Version 1709 / Windows 2016 / Windows 10 (for IIS Manager and Web Deploy)

Set the SchUseStrongCrypto registry key by saving the below code to enableTLS12.reg and running it:

Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319] "SchUseStrongCrypto"=dword:00000001 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319] "SchUseStrongCrypto"=dword:00000001 

Windows 2012 R2 / 2012 / Windows 8.1 / Windows 8 (for IIS Manager and Web Deploy)

Set the SchUseStrongCrypto registry key by saving the below code to enableTLS12.reg and running it:

Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319] "SchUseStrongCrypto"=dword:00000001 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319] "SchUseStrongCrypto"=dword:00000001 

Alternatively, install one of the following updates:

Windows 2012 R2, Windows 8.1: https://support.microsoft.com/en-us/kb/2898850

Windows 2012, Windows 8: https://support.microsoft.com/en-us/kb/2898849

Windows 2008 R2 / Windows 7 (for Web Deploy with NetFX 4.5.2 installed)

Follow the steps mentioned under Windows Server 2012 R2/Windows Server 2012 to enable SchUseStrongCrypto either through the registry or by installing the update in the applicable KB article.

Additionally, you must set the following registry keys, as Windows 2008 R2 and Windows 7 do not enable TLS 1.1 or TLS 1.2 by default. Save below code to enableTLS12.reg and run it:

Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client] "DisabledByDefault"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server] "DisabledByDefault"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client] "DisabledByDefault"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server] "DisabledByDefault"=dword:00000000 

Then, restart the computer.

Windows 2008 R2 / Windows 7

Install the NetFX update (KB3154518) that enables TLS 1.2 in .NET Framework 3.5.1: https://support.microsoft.com/en-us/kb/3154518

Then, set the following registry key by saving the below code to enableTLS12.reg and running it:

Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727] "SystemDefaultTlsVersions"=dword:00000001 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727] "SystemDefaultTlsVersions"=dword:00000001 

Additionally, you must set the following registry keys because Windows 2008 R2 and Windows 7 do not enable TLS 1.1/1.2 by default. below code to forceTLS1.2.reg and run it:

Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client] "DisabledByDefault"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server] "DisabledByDefault"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2] [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client] "DisabledByDefault"=dword:00000000 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server] "DisabledByDefault"=dword:00000000 

Restart the computer.

Помогите улучшить вклады

Помечайте вклады как бесполезные, если вы не считаете их актуальными или ценными для статьи. Этот отзыв будет доступен только вам и не будет общедоступным.

Скрытый вклад для вас

Этот отзыв никогда не будет общедоступным. Мы будем использовать его, чтобы показывать более качественные вклады всем участникам.

The underlying connection was closed the connection was closed unexpectedly

I developed my own dashboard and displying powerbi dashboad and reports with dataset refresh feature. it was working fine for the last one year but for the last few days suddenly it stop working and showing » The underlying connection was closed: An unexpected error occurred on a send «.

Just for more clarity i was following below steps to refresh the dataset as well as display reports

Refresh Data set:

1. Generate the Access token : getting access token

Here i am getting error: » The underlying connection was closed: An unexpected error occurred on a send «

Same error while try to get information for reports.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *