Azure.RequestFailedException: TableClient.UpsertEntity

Ramesh Bachu 0 Reputation points
2023-09-29T09:47:50.7066667+00:00
I hosted application on the Azure, I'm trying to insert a record in Azure table, using below function tableClient.UpsertEntityAsync <LogRequestEntity>(entity); 

I got below error.

I'm using .Net Framework 4.8. 
Any help would be greatly appreciated


System.AggregateException: Retry failed after 4 tries. Retry settings can be adjusted in ClientOptions.Retry or by configuring a custom retry policy in ClientOptions.RetryPolicy. ---> Azure.RequestFailedException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
   at System.Net.PooledStream.EndWrite(IAsyncResult asyncResult)
   at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
Azure Table Storage
Azure Table Storage
An Azure service that stores structured NoSQL data in the cloud.
170 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Siva Villa 285 Reputation points Microsoft Employee
    2023-10-06T03:57:17.0266667+00:00

    Based on the error message indicating an authentication failure, I suggest verifying the following options:

    Please verify the storage networking properties. If the storage account is restricted, ensure that you whitelist the source virtual network where your application is hosted.

    https://video2.skills-academy.com/en-us/azure/storage/common/storage-network-security?tabs=azure-portal#change-the-default-network-access-rule

    Validate whether you have granted the necessary permissions for the connection string or authentication credentials used to access the storage account.

    When you create a storage account, the minimum TLS version defaults to 1.2. hence, I recommend validating that your application is compatible with this TLS version.

    https://video2.skills-academy.com/en-us/azure/storage/common/transport-layer-security-configure-minimum-version?tabs=portal#configure-the-minimum-tls-version-for-a-storage-account

    Please ensure that you are using the most up-to-date version of the Azure SDK for .NET.

    https://video2.skills-academy.com/en-us/dotnet/api/overview/azure/storage?view=azure-dotnet

     

    Please do let me know if you need any further assistance with regards to this question.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.