0
votes

I need to persist a few cookies (they are not marked HttpOnly) between requests after signing in. I have it working in normal cases, but not after coming back from tombstoning. I've tried saving them to IsolatedStorageSettings.ApplicationSettings as a Dictionary<string, Cookie> on the deactivated event, however, some properties of the cookies are different when I retrieve them on the activated event. Here are some of the changes in the cookie values. I got these from evaluating the cookie in the immediate window to get all it's values.

_Port: changed from "" to "$Port"

m_domain_implicit: changed from true to false

m_port_implicit: changed from true to false

The service calls work before tombstoning but not after and the only difference between calls are the cookies. Anyone know why cookie values are changing when returning from tombstoning and getting the cookies from IsolatedStorageSettings.ApplicationSettings. Is there a better way to save cookies when tombstoning?

1

1 Answers

1
votes

Anything you add to IsolatedStorageSettings is serialized with the DataContractSerializer. My guess is that this doesn't handle the serialization and deserialization correctly.

If this is the case you'll have to handle the serialization and deserialization yourself.