Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to cast object of type 'System.Web.SessionState.SessionStateItemCollection' to type 'Microsoft.Web.Redis.ChangeTrackingSessionStateItemCollection'. #111

Open
footcha opened this issue Oct 26, 2018 · 1 comment

Comments

@footcha
Copy link

footcha commented Oct 26, 2018

Hello,
last week we started using Microsoft.Web.RedisSessionStateProvider in our live environments globally. Since then we are experiecing tens of millions exceptions per day (a log bellow is exported from Application Insights):

[{
    "severityLevel": "Critical",
    "outerId": "57776361",
    "message": "Unable to cast object of type 'System.Web.SessionState.SessionStateItemCollection' to type 'Microsoft.Web.Redis.ChangeTrackingSessionStateItemCollection'.",
    "parsedStack": [{
        "assembly": "Microsoft.Web.RedisSessionStateProvider, Version=3.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
        "method": "Microsoft.Web.Redis.RedisConnectionWrapper.SetPrepare",
        "level": 0,
        "line": 0
    },
    {
        "assembly": "Microsoft.Web.RedisSessionStateProvider, Version=3.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
        "method": "Microsoft.Web.Redis.RedisConnectionWrapper.Set",
        "level": 1,
        "line": 0
    },
    {
        "assembly": "Microsoft.Web.RedisSessionStateProvider, Version=3.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
        "method": "Microsoft.Web.Redis.RedisSessionStateProvider+<SetAndReleaseItemExclusiveAsync>d__25.MoveNext",
        "level": 2,
        "line": 0
    }],
    "type": "System.InvalidCastException",
    "id": "12895194"
}]

After two days of investigations I still cannot say preciselly which part of ASP.Net pipeline is responsible for passing object of type SessionStateItemCollection into a method RedisSessionStateProvider.SetAndReleaseItemExclusiveAsync.

It seems that despite such a huge number of exceptions it does not have remarkable negative impact on user experience. Still, this issue makes me worried a lot.

I will prepare a pull request to eliminate such errors.

footcha added a commit to footcha/aspnet-redis-providers that referenced this issue Oct 26, 2018
@footcha
Copy link
Author

footcha commented Nov 16, 2018

Is there any progress in reviewing the related pul request and this issue itself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant