By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 1,046 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

How to access currently logged in user from Active Directory. (Without custom login page)

P: n/a
Hi all,

I've been searching the way to achieve the following task.
But no luck so far.

I have a web site(main site), which requires authentication. This
authentication is set at Windows directory level, so user will see the
pop up gray box in order to log in rather than custom web page. The
username and password are stored at active directory level, thus this is
the windows integrated security.

Now, I have created another web site under same security setting. So
once user logged into the main web site and click on the link to this
second web site, they can view the site without additional login.

Here is what I need. I need to read in currently logged in user from
the second web site, since this is something I will be storing in my
database as well as use it to determine certain business logics.

One obvious work around is to creat custom login page to Active
Directory, and store the logged in userid in session variable as I
authenticate. Unfortunately, this is not what I want to do. Because I
have no control over the main web site. So if I take this approach,
user must login twice in order to user my site. First login to main
site, then when they click on the link to my site, type in the same
login userid and password to view my site.

I'm hoping to see some simple solution such as Session["CurrentUserID"]
variable.. (if there is one..)

Please help!

Thanks

Takashi


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I don't think you'll get an easy answer to this. If these are two separate
websites (even if on the same server) then the context the code is running
under is different, and the Session objects will be completely separated. In
addition, IE will see them as two separate sites, and will require separate
logins (as long as your using integrated security)

If you want to keep the current session and stay with one login, you'll have
to add you new webapp to the same site/application as the first one by
creating a virtual directory under the existing site.
Arild

"anonymous" <an*******@devdex.com> wrote in message
news:eX**************@TK2MSFTNGP12.phx.gbl...
Hi all,

I've been searching the way to achieve the following task.
But no luck so far.

I have a web site(main site), which requires authentication. This
authentication is set at Windows directory level, so user will see the
pop up gray box in order to log in rather than custom web page. The
username and password are stored at active directory level, thus this is
the windows integrated security.

Now, I have created another web site under same security setting. So
once user logged into the main web site and click on the link to this
second web site, they can view the site without additional login.

Here is what I need. I need to read in currently logged in user from
the second web site, since this is something I will be storing in my
database as well as use it to determine certain business logics.

One obvious work around is to creat custom login page to Active
Directory, and store the logged in userid in session variable as I
authenticate. Unfortunately, this is not what I want to do. Because I
have no control over the main web site. So if I take this approach,
user must login twice in order to user my site. First login to main
site, then when they click on the link to my site, type in the same
login userid and password to view my site.

I'm hoping to see some simple solution such as Session["CurrentUserID"]
variable.. (if there is one..)

Please help!

Thanks

Takashi


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.