Azure Redis from .net

Jonna, Sasanka 5 Reputation points
2023-08-10T14:57:13.8333333+00:00

Trying to connect to Azure Redis from a .net 4.7.1 aplication and been getting this error. WHat are my options?

User's image

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,940 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,013 questions
Azure Cache for Redis
Azure Cache for Redis
An Azure service that provides access to a secure, dedicated Redis cache, managed by Microsoft.
260 questions
{count} votes

1 answer

Sort by: Most helpful
  1. navba-MSFT 25,500 Reputation points Microsoft Employee
    2023-08-11T09:04:45.8733333+00:00

    @Jonna, Sasanka Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    I understand you are facing exceptions from your application while trying to connect to Azure Redis cache.

    From the error message its pretty clear that this is an issue with connectivity. Here are a few action plans to try:

    Plan 1: When you use a third-party firewall or proxy in your network, check that the endpoint for Azure Cache for Redis, *.redis.cache.windows.net, is allowed along with the ports 6379 and 6380.

    Plan 2:
    Could you please try checking the network connectivity ( between your dev machine and the azure redis cache ) ? This can be done by running the telnet client command as shown below:

    Try for non-ssl (6379):

    telnet sjrediscache.redis.cache.windows.net 6379

    Try for SSL (6380):

    telnet sjrediscache.redis.cache.windows.net 6380

    If the port / connection is not open it will throw an error. If the connectivity is fine, It should show a blank window.

    Plan 3: You could try connecting to the Azure Redis cache server using redis cli tool as shown below: **

    redis-cli.exe -h yourcachename.redis.cache.windows.net -p 6379 -a YourAccessKey**

    If you send PING command, the reply should come as PONG. Then we know connectivity is working fine.
    User's image

    For using rediscli with 6380 port follow this article.

    Plan 4: You can navigate to the Azure Redis cache portal and open the console and try the Ping command and wait for the PONG reply.:
    User's image

    User's image

    Plan 5:
    On the Azure Redis cache also confirm if you don't have any Firewall / Vnet configured.

    Plan 6:
    You can test connectivity using psping command too. Refer this.

    Hope this helps.

    **
    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    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.