StackExchange / StackExchange.Redis

General purpose redis client
https://stackexchange.github.io/StackExchange.Redis/
Other
5.85k stars 1.5k forks source link

An exception was thrown while invoking the constructor 'Void .ctor()' on type 'RedisCacheService'. #2626

Closed Mjalali1982 closed 5 months ago

Mjalali1982 commented 6 months ago

0

I am going to change my server, but when I want to run my application on the new server, I get this error:

An exception was thrown while activating Walrus.AAA.Services.SharedServices.Core.TokenService -> Walrus.AAA.Services.EndUserServices.Core.UserService -> Walrus.AAA.Services.SharedServices.Core.CacheService.RedisCacheService. Inner: An exception was thrown while invoking the constructor 'Void .ctor()' on type 'RedisCacheService'.

This application still works correctly on the previous server, but it gives this error on the new server. Does anyone know what I should do?

I checked the connection between this server and Redis and it was correct. The config file related to this connection is also correct .

mgravell commented 6 months ago

Also received via email. Echoing my response,for visibility:

Well, what is RedisCacheService? That isn't a SE.Redis type, so it is hard for me to comment. Also, try looking at the InnerException here - it may provide more context.

mgravell commented 6 months ago

If that doesn't help, but the error is definitely in a "connect" step: the ConnectionMultiplexer.Connect[Async](...) API accepts an optional "log" parameter; if you pass in a suitable writer, lots of additional context is emitted, which can help identify what is failing.

Mjalali1982 commented 6 months ago

Thank you dear Mark for answering me. I will try to find a solution to the problem with this guide and I will let you know the result. thank you

On Mon, 1 Jan 2024 at 09:28, Marc Gravell @.***> wrote:

If that doesn't help, but the error is definitely in a "connect" step: the ConnectionMultiplexer.ConnectAsync API accepts an optional "log" parameter; if you pass in a suitable writer, lots of additional context is emitted, which can help identify what is failing.

— Reply to this email directly, view it on GitHub https://github.com/StackExchange/StackExchange.Redis/issues/2626#issuecomment-1873173160, or unsubscribe https://github.com/notifications/unsubscribe-auth/BFA7C55HDRHKYTXKOZINDGTYMJF6TAVCNFSM6AAAAABBILFSVOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZTGE3TGMJWGA . You are receiving this because you authored the thread.Message ID: @.***>