?
Solved

Determine authenticated user in SBS2003 RWW

Posted on 2006-03-28
10
Medium Priority
?
443 Views
Last Modified: 2010-08-05
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
0
Comment
Question by:smert
9 Comments
 
LVL 15

Expert Comment

by:deighc
ID: 16311163
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
 
LVL 1

Author Comment

by:smert
ID: 16311317
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
 
LVL 1

Author Comment

by:smert
ID: 16311453
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:randeeps
ID: 16312481
@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
 
LVL 10

Expert Comment

by:randeeps
ID: 16312533
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
 
LVL 10

Expert Comment

by:randeeps
ID: 16312548
one thing i forgot to mention, you will have to call this new page once you login to the RWW application.
0
 
LVL 1

Author Comment

by:smert
ID: 16318898
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
 
LVL 10

Expert Comment

by:randeeps
ID: 16319180
>>>...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
 

Accepted Solution

by:
GranMod earned 0 total points
ID: 16353425
Closed, 500 points refunded.
GranMod
The Experts Exchange
Community Support Moderator of all Ages
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question