Determine authenticated user in SBS2003 RWW

Hi all,

I'm not sure if this is the correct place to ask this as it covers 3 topic areas but....

I am trying to write a system to determine who is currently logged into Remote Web Workplace in SBS2003. What I am intending is create an ASP page that is called via an AJAX call from the client.aspx file. The ASP file will take the authenticated user and store their details in a database. A similar call from the logout page will then update the DB with the log out time.

My problem is finding out the authenticated user details. All the ServerVariables relating to users are empty.

Thanks
LVL 1
smertAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

deighcCommented:
If you set the ASP web application to use Windows Integrated authentication and disable anonymous access then the end users will automatically be authenticated against their NT domain accounts and you can then get the username and domain of the end user from the "LogOn_User" ServerVariable (these settings are found in the IIS admin console).

If you need additional information about the end user then you'll need to read this out of the Active Directory.
0
smertAuthor Commented:
Thanks deighc,

That's exactly what I thought I would have to do, but unfortunately no dice. As I said previously the servervariable is empty. If I turn off anonymous access then the users have to put their username/password into the standard dialog before they get to the RWW login screen, where they have to put it in again.

I am starting to think because the RWW is a .NET application using Forms based authentication, I cannot get access to any of the internal variables, and because the application is precompiled and I don't have the source code, I can't change the original app.

What I need is a way of accessing the Forms based authentication details from classic ASP as I can't change the .Net app.
0
smertAuthor Commented:
I have just worked out a method! The welcome text at the top of the rww homepage is a variable that I can pass through to my classic asp page via the ajax call!

The variable is of the form: Welcome, Firstname Surname.
So it is just a case of stripping the string down to: Firstname Surname and storing in the DB along with a sessionID, then from the logout page I can retrieve the sessionID and update the DB!

Unless there is a more elegant way!
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

randeepsCommented:
@smert -
>>>I have just worked out a method! The welcome text at the top of the rww homepage is a variable that I can pass through to my classic asp page via the ajax call!

The variable is of the form: Welcome, Firstname Surname.
So it is just a case of stripping the string down to: Firstname Surname and storing in the DB along with a sessionID, then from the logout page I can retrieve the sessionID and update the DB!

Unless there is a more elegant way!


--
I can atleast comment that this is not a stable solution as you may find people with same names and once you do your system will misbehave. Rest OI dont know muich abt RWW .. so cannot comment on hjow you can get the logged in user.
0
randeepsCommented:
create a new aspx page withing RWW application whcih willl display list of all session variables... this way we may get a hint into whether they are maintainiing the state using sessions or some other technique.

Something like this will do

Dim obj as obj
For each obj in Session.Contents
   Response.Write (Session.Contents (obj))
Next


The syntax maybe wrong but you will get an idea what I mean.

HTH

0
randeepsCommented:
one thing i forgot to mention, you will have to call this new page once you login to the RWW application.
0
smertAuthor Commented:
Thanks randeeps.

>...you may find people with same names...
We only have a limited number of users who all have different names so that isn't a problem!

>create a new aspx page withing RWW application
Because the RWW is a compiled .Net app, the session variables are limited to within the .Net app and I can't alter it.

The solution I have seems to be working though!
0
randeepsCommented:
>>>...you may find people with same names...
We only have a limited number of users who all have different names so that isn't a problem!

You are doing a typical mistake of not looking ahead in time that there maybe a possibility of same names.


>>>create a new aspx page withing RWW application
Because the RWW is a compiled .Net app, the session variables are limited to within the .Net app and I can't alter it.

So what if it is compiled. You can still create the new aspx page (dont use codebehind) and do the suggested coding in it to get the list of session variables and call that page after you log in to the RWW application. This change does not require you to have the source code of the application. Why besatisfied with a workaround when you can develop a stable solution which will take caer of 1st pt above.

Rest you know better.

Cheers
0
GranModCommented:
Closed, 500 points refunded.
GranMod
The Experts Exchange
Community Support Moderator of all Ages
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.