Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 961127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:17:34+00:00 2026-05-16T01:17:34+00:00

This is simple xslt, that shows the login status of the current user. Everything

  • 0

This is simple xslt, that shows the login status of the current user. Everything worked fine on development server, but once we’ve setup app on production, umbraco.librarty.IsLoggedOn() started always to return false.

Application uses method umbraco.libraty.IsLoggedOn() from .NET code and from there it returns proper value, but from xslt doesn’t.

 <xsl:choose>
  <xsl:when test="umbraco.library:IsLoggedOn() = true()">
   You are logged in as 
    <q>
      <xsl:variable name="user" select="umbraco.library:GetCurrentMember()/@loginName"/>
      <xsl:value-of select="$user"/>
    </q>.  This is <a href="/profile">your profile</a>.
  </xsl:when>
  <xsl:otherwise>
   You are not logged in.
    <a href="/registruj-se">Log in</a>.
  </xsl:otherwise>
</xsl:choose>

For non-umbraco developers: the library.IsLoggedOn() function checks HttpContext.Current.User and HttpContext.Current.User.Identity.IsAuthenticated to see if you is logged in or not.

Maybe it is a problem with cookies and XSLT? Anyone have a clue?
Tnx

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:17:34+00:00Added an answer on May 16, 2026 at 1:17 am

    Ok, this is solution to my problem.

    The session was not available from xslt, neither from ascx control that tried to access session from codebehind. Our application is 99% using asp.net webservice with methods marked with [WebMethod(EnableSession = true)]. Inside of these methods, session was available. That made me think that session is actually disabled on the web site by default.

    After some googling, I find out that I have to add this property to web.config file:

    <system.webServer>
    <modules runAllManagedModulesForAllRequests="true">
    

    Apparently, the machine.config in our development had this property as default, and production server didn’t, so it needed to be changed in web.config.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This should be simple and everything I read says that select = name should
I've found a lot of examples that reference Java and C for this, but
So I've never used XSLT before, so this is probably a very simple problem.
I'm trying to do something that seems like it should be very simple, but
The problem I'm facing seems simple, but being a novice in everything XSL -
Apologies if this is a very simple question; I don't use XSLT very much
This is a simple question, but one I cannot find the answer to. I
This simple query session = com.jthink.songlayer.hibernate.HibernateUtil.getSession(); Query q = session.createQuery(recNo from SongChanges); giving this
This simple script should theoretically check the form for errors and then print any
This simple example fails to compile in VS2K8: io_service io2; shared_ptr<asio::deadline_timer> dt(make_shared<asio::deadline_timer>(io2, posix_time::seconds(20))); As

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.