Skip to content

Value cannot be null. stringToEscape #3

@wakawajaszi

Description

@wakawajaszi

Hello,

I'm getting this error:

System.ArgumentNullException: Value cannot be null.
Parameter name: stringToEscape
   at System.Uri.EscapeDataString(String stringToEscape)
   at Microsoft.AspNetCore.Http.Internal.ResponseCookies.Append(String key, String value, CookieOptions options)
   at ReturnTrue.AspNetCore.Identity.Anonymous.AnonymousIdMiddleware.HandleRequest(HttpContext httpContext)
   at ReturnTrue.AspNetCore.Identity.Anonymous.AnonymousIdMiddleware.<Invoke>d__3.MoveNext()

This error occurs after the number of second I set up in AnonymousIdCookieOptionsBuilder -> SetCustomCookieTimeout

It looks like the code in AnonymousIdMiddleware on lines 86-98 doesn't work properly (maybe something wrong with bool SlidingExpiration value ) and can't attach a new cookie.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions