locked
How to check if the user has logged on? RRS feed

  • Question

  • Folks,

     

    I am adding a web page (ASP.NET) to my WHS and before loading the page I want to make sure that the user has logged on using the remote portal. What can I check in my code for this? Is there a session or application state variable or something that WHS maintains that I could check to see if the user has logged in?

    Monday, March 24, 2008 1:31 AM

Answers

  • Sure. I found the answer towards the end of THIS article. Basically, the solution involves copying the contents of the <system.web> configuration section from /remote's web.config to your web.config's <system.web>. This brings the auth cookie info over. You do need to edit a couple of values as explained in the article so that proper redirection occurs if the user hasn't logged on.

     

     Brendan Grant wrote:

    Great to hear, would you mind sharing it with the forums so that anyone else having a similar issue who run across this thread will find the answer as well?

    Tuesday, March 25, 2008 12:28 PM

All replies

  • Never mind. Found the solution.

     

     BigCat400 wrote:

    Folks,

     

    I am adding a web page (ASP.NET) to my WHS and before loading the page I want to make sure that the user has logged on using the remote portal. What can I check in my code for this? Is there a session or application state variable or something that WHS maintains that I could check to see if the user has logged in?

    Monday, March 24, 2008 4:46 PM
  • Great to hear, would you mind sharing it with the forums so that anyone else having a similar issue who run across this thread will find the answer as well?

    Tuesday, March 25, 2008 12:28 AM
    Moderator
  • Sure. I found the answer towards the end of THIS article. Basically, the solution involves copying the contents of the <system.web> configuration section from /remote's web.config to your web.config's <system.web>. This brings the auth cookie info over. You do need to edit a couple of values as explained in the article so that proper redirection occurs if the user hasn't logged on.

     

     Brendan Grant wrote:

    Great to hear, would you mind sharing it with the forums so that anyone else having a similar issue who run across this thread will find the answer as well?

    Tuesday, March 25, 2008 12:28 PM