Developer forum

Forum » Development » sessionState 'StateServer' and 'SQLServer' not supported in DW

sessionState 'StateServer' and 'SQLServer' not supported in DW

Remi Muller
Reply

It looks like sessionState 'StateServer' and 'SQLServer' is not supported in DW.

I get the following error:
"Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode."

 

Is het possible that DW improves the use of storing data in the session which is serializable?

 

 

I need this because a customer want to have to different shops with it's own primary domain. (DomainA.com, DomainB.com)

When an anonymous user fills hist cart on DomainA and navigaties to DomainB he would see his products from DomainB.

Today it does not work because a new session is created for DomainB. If it would be possible to share the sessionData between domains it could be possible to restore/load the session from DomainA.

 

 

For this to work i would need the session data to be stored in SQL server. But this is currently not possible :(

 

It is appreciated if you have other suggestions of how to achieve this.

 

DW would a request to make the session serializable have a big impact? If not then please fix this :)

 


Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Remi,

 

We are not currently exploring the possibility of storing the session state in other ways, but it seems to me that your specific hurdle can be overcome with a new feature we're adding in 8.4, called Order Contexts.

 

With Order Contexts, it's possible to create any number of contexts in which carts can live. You can assign these Order Contexts to specific shops or websites, and you can use the same Context for multiple shops and websites. What this allows you to do is to have a single solution with multiple websites and shops, and have the carts flow seemlessly across these websites and shops. The only requirement is that it is the same Dynamicweb solution.

 

- Jeppe

 
Remi Muller
Reply

oke that sounds like a solution.

 

 Does this order context work for anonymous users and over different primary domains like domainA.com and domainB.com?

 

Does this mean if the user is logged in on domainA en navigates to domainB that the cart is persisted but the user is not logged in anymore on domainB?
This would be acceptable I think.

 

 

 

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

I'm not sure whether it's been tested with primary domain yet, but this is the way it's supposed to work. I'll follow up on this and get back to you, but that probably won't be until tomorrow.

 

- Jeppe

 
Remi Muller
Reply

Would it be possible if i get a beta version of 8.4?

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

Hi Remi,

 

After rereading your follow-up question, I have ro revise my answer. This will not work unless the same user logs in on both domains. If this is not the case, we have no way of linking the current visitor to a given cart. We have no unique identifier that flows across domains as we cannot rely on IP. At best it would be a qualified guess. You would face the same problem if you were to store the session externally.

 

- Jeppe

 
Remi Muller
Reply

oke thanks.

Would a request to make the session serializable have a big impact?
Can you please investigate this?


 

I have a customer where this is required to work or we have to go for a different solution. :(

We really need to able to share the session over primary domains. This is possible but first step is to be able to use the sessionstate sqlserver.

 

 

 

 

 

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply

I have added a feature request to our backlog that we will discuss internally. This will not be until after 8.4 is released though. The feature request id is TFS14100.

 

- Jeppe

 
Remi Muller
Reply

Would this be a good time to ask for an update on feature request TFS14100? Please :)

 
Nicolai Høeg Pedersen
Reply

Hi Remi

We have not done anything further in this matter.

It is not a small change, and not one we can pull out of the hat in a short amount of time.

If the user is logged in, he can get hold of his cart across domains. You can also use a link between the domains or create a cookie that can be accessed from both domains that holds the order id and then load it.

BR Nicolai

 

You must be logged in to post in the forum