StackExchange.Redis icon indicating copy to clipboard operation
StackExchange.Redis copied to clipboard

Access to encrypted Azure Redis isn't working from ASP.Net application

Open andrebq opened this issue 10 years ago • 5 comments

Hi,

I am having a problem accessing a Azure Redis server using SSL from within a ASP.Net application. Trying from a Console Application works. Using a unencrypted connection also works (even from the ASP.Net application).

The connection string that I am using is (with host/password redacted)::6380,ssl=true,password=,connectTimeout=10000,abortConnect=false

When calling Azure Redis from the ASP.Net application I get a lot of TCP RST packets but when calling from the Console App I get the expected result (TCP handshake, Certificate exchange, Data exchange, connection closed).

I saw this link (http://stackoverflow.com/questions/31219901/unable-to-connect-to-azure-redis-cache-with-ssl) but the solution didn't worked.

andrebq avatar Jan 04 '16 22:01 andrebq

Can you be specific about what happens instead? Any particular exception / stack trace/ etc? On 4 Jan 2016 10:17 p.m., "André Luiz Alves Moraes" < [email protected]> wrote:

Hi,

I am having a problem accessing a Azure Redis server using SSL from within a ASPNet application Trying from a Console Application works Using a unencrypted connection also works (even from the ASPNet application)

This is the connection string that I am using is (with host/password redacted)::6380,ssl=true,password=,connectTimeout=10000,abortConnect=false

When calling Azure Redis from the ASPNet application I get a lot of TCP RST packets but when calling from the Console App I get the expected result (TCP handshake, Certificate exchange, Data exchange, connection closed)

I saw this link ( http://stackoverflowcom/questions/31219901/unable-to-connect-to-azure-redis-cache-with-ssl) but the solution didn't worked

— Reply to this email directly or view it on GitHub https://github.com/StackExchange/StackExchange.Redis/issues/330.

mgravell avatar Jan 04 '16 22:01 mgravell

@mgravell,

Message: No connection is available to service this operation: SET StartTime

Stack Trace:

at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor`1 processor, ServerEndPoint server) in c:\TeamCity\buildAgent\work\3ae0647004edff78\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 1857
   at StackExchange.Redis.RedisBase.ExecuteSync[T](Message message, ResultProcessor`1 processor, ServerEndPoint server) in c:\TeamCity\buildAgent\work\3ae0647004edff78\StackExchange.Redis\StackExchange\Redis\RedisBase.cs:line 80
   at StackExchange.Redis.RedisDatabase.StringSet(RedisKey key, RedisValue value, Nullable`1 expiry, When when, CommandFlags flags) in c:\TeamCity\buildAgent\work\3ae0647004edff78\StackExchange.Redis\StackExchange\Redis\RedisDatabase.cs:line 1549

andrebq avatar Jan 04 '16 22:01 andrebq

Any chance you are specifying a certificate validation routine in your app somewhere? I have seen cases where the cert validator returns false and SE.Redis gives this same type of generic error.

JonCole avatar Mar 23 '16 22:03 JonCole

@JonCole I wasn't doing anything like that in the app. The problem was solved but I don't remember the solution right now and the code was delivered to the client and I don't have access anymore.

andrebq avatar Dec 06 '16 20:12 andrebq

Closing this out as we don't have the relevant info here. If anyone has anything to add I'll happily reopen this.

NickCraver avatar Sep 02 '17 01:09 NickCraver