I've successfully extended an xslt macro to call a C# dll and am calling this macro from my Home page templates. Everything works fine, except I can't seem to find the session state. I need to store values accross page loads and Session["xxx"] is always turning up to be "not set to an instance of an object". I am using domains/hostnames with <useDomainPrefixes>true</useDomainPrefixes> in umbracoSettings.config in case that makes a difference.
Any tips on how to store cross-page data in this context.
This helped and is definitely an answer. I am still plagued by the fact that the session state seems to be a bit flaky: somtimes, is still get null objects. This may be a timing problem, or a problem concerning the Umbraco domain usage, but I'm not enough of an insider to tell... I'll let you know if I figure it out.
xslt macro=> C# dll: HttpContext.Current.Session invalid?
Hi,
I've successfully extended an xslt macro to call a C# dll and am calling this macro from my Home page templates. Everything works fine, except I can't seem to find the session state. I need to store values accross page loads and Session["xxx"] is always turning up to be "not set to an instance of an object". I am using domains/hostnames with <useDomainPrefixes>true</useDomainPrefixes> in umbracoSettings.config in case that makes a difference.
Any tips on how to store cross-page data in this context.
Thanks!
R
You probably need to implement IRequiresSessionState in your XSLT extension library:
Thanks Kenneth,
This helped and is definitely an answer. I am still plagued by the fact that the session state seems to be a bit flaky: somtimes, is still get null objects. This may be a timing problem, or a problem concerning the Umbraco domain usage, but I'm not enough of an insider to tell... I'll let you know if I figure it out.
Best regards,
R
When are sessions restarted in Umbraco?
Thanks!
is working on a reply...