473,749 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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["CurrentUse rID"]
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
1 7309
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*******@devd ex.com> wrote in message
news:eX******** ******@TK2MSFTN GP12.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["CurrentUse rID"]
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
17279
by: fr? | last post by:
Hi, i have a website , on wich users have to log in credentials are checked against mysql db some session vars are set during login for use somewhere else in the code. Is there a way to prohibit a user to log in twice. A was thinking about setting some flag in the db, but in that case i need some timeout in case a pc can crash for instance so the user does
3
2597
by: Coder Droid | last post by:
Without going into the details of my code: is it possible to have two different users logged in at the same time? I had one page where I found the username correctly set, and another where it wasn't. (Just by checking <?= $_SERVER >? at the top of each page.) Wondering why it would be set for one page and not another (and as a sanity check) I wrote another page which sends the basic auth headers and so logged in again.
3
24035
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked tables in the database where the code resides. If we move the database with the data tables to a new directory, the links are no longer valid. I tried to update the links by changing the Connect property and refreshing: Set td = db.TableDefs(0)...
7
8868
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and save it to the user's machine. I am using Adobe Acrobat (5.0 I think) and have Adobe Distiller as a
11
6598
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on where the job is running, the job runs sucessfully, PDF files got generated, everything is good. If I scheduled the job to run at the time that I am not logged into the server, Access is not able to print to the printer. The error is pretty...
3
3493
by: Lyle Fairfield | last post by:
In a recent thread there has been discussion about Data Access Pages. It has been suggested that they are not permitted on many or most secure sites. Perhaps, that it is so, although I know of no site that has this prohibition, and I have uploaded DAPs to various sites and used them from those sites. I do not understand why any site manager would prohibit DAPs. To the best of my knowledge DAPs, as HTM files, are merely hosted on the...
3
2244
by: Chakkaradeep | last post by:
Hi all, How to retrieve Users Names and also restrict internet access to a specific users using C# ? Thanks. Regards, C.C.Chakkaradeep
16
2510
by: Ben Sehara | last post by:
Is there any way I can limit the access to my website? I have a site "A" and I want to allow access to it only from site "B" login user. If someone try to access site "A" directory, I want it redirected to site "B" for login. After login at site "B", you see the link to site"A". When you click it, you see login page for site "A". Is it possible? Thanks.
15
2703
by: paul814 | last post by:
Is it possible to display the logged in user that is accessing the form, in a textbox? so say I have txtname I want to display the username of the person that is logged in to the PC in that box, can I do this? How would this be done?
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9566
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6800
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.