Try our conversational search powered by Generative AI!

Thumbnail generation relies on ASP.NET_SessionId cookie, but should check web.config for different name

Found in

EPiServer.Marketing.Testing 2.5.0

Fixed in

EPiServer.Marketing.Testing 2.5.1

(Or a related package)

Created

Apr 19, 2018

Updated

Apr 30, 2018

State

Closed, Fixed and tested


Description

ThumbnailRepository:GetContextThumbData needs to get the session id to generate the thumbnail. It gets the session id using the cookie named "ASP.NET_SessionId". However, some customers change the name to something else using the web config attribute.

<system.web>
    <sessionState cookieName="MyCustomSessionStateCookie" />  

We need to fix it so, if the hard-coded name is not there, get the name of the cookie from the web config file.

<sessionState 
    mode="[Off|InProc|StateServer|SQLServer|Custom]"
    timeout="number of minutes"
    cookieName="session identifier cookie name"
    cookieless=
         "[true|false|AutoDetect|UseCookies|UseUri|UseDeviceProfile]"
    regenerateExpiredSessionId="[True|False]"
    sessionIDManagerType="session manager type"
    sqlConnectionString="sql connection string"
    sqlCommandTimeout="number of seconds"
    allowCustomSqlDatabase="[True|False]"
    useHostingIdentity="[True|False]"
    stateConnectionString="tcpip=server:port"
    stateNetworkTimeout="number of seconds"
    customProvider="custom provider name"
    compressionEnabled="[True|False]"
    sqlConnectionRetryInterval="number of seconds">
    <providers>...</providers>
</sessionState>