ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old July 2nd, 2009, 04:19 PM
newtoasp_pk newtoasp_pk is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 103 newtoasp_pk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 22 m 32 sec
Reputation Power: 1
VBScript - General - Question - NT Logon

Hi

Does anyone have a script that captures the NTLogon in asp
The only way I can keep a track of the person accessing the site is by capturing the NTLogon.

I have tried the following code;but it is not returning any value.

Request.ServerVariables("AUTH_USER")

Can someone pls help.

Thanks

Reply With Quote
  #2  
Old July 2nd, 2009, 04:52 PM
lookout888 lookout888 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 2 lookout888 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 56 sec
Reputation Power: 0
Name = Request.ServerVariables("LOGON_USER")

This will tell you who is logged onto the computer.

Reply With Quote
  #3  
Old July 3rd, 2009, 03:49 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,416 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 23 h 57 m 27 sec
Reputation Power: 1800
Request.ServerVariables("AUTH_USER") or ("LOGON_USER") will not return a value if anonymous access is enabled. You need to open IIS and make sure that Windows Integrated Authentication is enabled on the Security tab.
Comments on this post
Nilpo agrees!

Reply With Quote
  #4  
Old July 3rd, 2009, 04:05 AM
newtoasp_pk newtoasp_pk is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 103 newtoasp_pk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 22 m 32 sec
Reputation Power: 1
Quote:
Originally Posted by lookout888
Name = Request.ServerVariables("LOGON_USER")

This will tell you who is logged onto the computer.


Hi,


Neither

Username = Request.ServerVariables("LOGON_USER")
nor
Username = Request.ServerVariables("AUTH_USER")

are working.

Any other wayout?
Thanks

Reply With Quote
  #5  
Old July 3rd, 2009, 04:07 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,416 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 23 h 57 m 27 sec
Reputation Power: 1800
Quote:
Originally Posted by newtoasp_pk
Hi,


Neither

Username = Request.ServerVariables("LOGON_USER")
nor
Username = Request.ServerVariables("AUTH_USER")

are working.

Any other wayout?
Thanks

Have you enabled Windows Integrated Authentication?

Reply With Quote
  #6  
Old July 3rd, 2009, 04:14 AM
newtoasp_pk newtoasp_pk is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 103 newtoasp_pk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 22 m 32 sec
Reputation Power: 1
Quote:
Originally Posted by sync_or_swim
Have you enabled Windows Integrated Authentication?


Yes, authentication is enabled

Reply With Quote
  #7  
Old July 3rd, 2009, 04:18 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,416 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 23 h 57 m 27 sec
Reputation Power: 1800
Quote:
Originally Posted by newtoasp_pk
Yes, authentication is enabled

And anonymous access is disabled in IIS?

Reply With Quote
  #8  
Old July 3rd, 2009, 04:24 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,416 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 23 h 57 m 27 sec
Reputation Power: 1800
You can use this code to display the contents of the whole Request.ServerVariables collection so you can see what they contain:
Code:
<TABLE>
      <TR>
           <TD>
                <B>Server Varriable</B>
           </TD>
           <TD>
                <B>Value</B>
           </TD>
      </TR>

      <% For Each name In Request.ServerVariables %>
      <TR>
           <TD>
                <%= name %>
           </TD>
           <TD>
                <%= Request.ServerVariables(name) %>
           </TD>
      </TR>
      <% Next %>
</TABLE>

Reply With Quote
  #9  
Old July 3rd, 2009, 04:25 AM
newtoasp_pk newtoasp_pk is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 103 newtoasp_pk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 22 m 32 sec
Reputation Power: 1
Quote:
Originally Posted by sync_or_swim
And anonymous access is disabled in IIS?


----------

Hi,

Thanks
Its working now. I was checking at the wrong server.

Thanks

Reply With Quote
  #10  
Old July 3rd, 2009, 04:29 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,416 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 23 h 57 m 27 sec
Reputation Power: 1800
Quote:
Originally Posted by newtoasp_pk
----------

Hi,

Thanks
Its working now. I was checking at the wrong server.

Thanks

LOL!! You're welcome, glad you got it working!!

Reply With Quote
  #11  
Old July 3rd, 2009, 04:36 AM
newtoasp_pk newtoasp_pk is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 103 newtoasp_pk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 22 m 32 sec
Reputation Power: 1
Quote:
Originally Posted by sync_or_swim
LOL!! You're welcome, glad you got it working!!



Quick question- does it have an impact if we enable 'Windows Integrated Authentication' on any existing set up as anonymous access is disabled

Thanks

Reply With Quote
  #12  
Old July 3rd, 2009, 04:43 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,416 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 23 h 57 m 27 sec
Reputation Power: 1800
Quote:
Originally Posted by newtoasp_pk
Quick question- does it have an impact if we enable 'Windows Integrated Authentication' on any existing set up as anonymous access is disabled

Thanks

It would depend upon your circumstances and the nature of the application but as far as I am aware, the only way you can grab the Windows login is via the Request.ServerVariables collection which will not work with anonymous access enabled. Therefore, if you need to grab the NT Logon you would need WIA enabled.

With regards your existing setup, it would mean that users who are not authenticated correctly against your domain would not be able to access your application.

Reply With Quote
  #13  
Old July 7th, 2009, 05:39 PM
newtoasp_pk newtoasp_pk is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 103 newtoasp_pk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 22 m 32 sec
Reputation Power: 1
Quote:
Originally Posted by sync_or_swim
It would depend upon your circumstances and the nature of the application but as far as I am aware, the only way you can grab the Windows login is via the Request.ServerVariables collection which will not work with anonymous access enabled. Therefore, if you need to grab the NT Logon you would need WIA enabled.

With regards your existing setup, it would mean that users who are not authenticated correctly against your domain would not be able to access your application.

======

I am using LOGON_USER across pages but the value seems to be getting lost for some reason

Page1 on submit goes to Page 2 which caputes LOGON_USER & on submit passes it to Page 3

If however,I use the Explorer's back arrow & go back to page 1, and then navigate to page2->page3, the value of LOGON_USER is not getting forwarded. It appears as spaces...
Ny clues???

Username is capturing the LOGON_USER in the code below

This is how Im passing the value:
[Code]
<form method=post name="Test" action="Page3.asp">
<input type=hidden name=Username value=<% =Username %> >
<input type='submit' name='submit' value='Next'>

Reply With Quote
  #14  
Old July 8th, 2009, 03:46 AM
sync_or_swim's Avatar
sync_or_swim sync_or_swim is offline
Moderator
Click here for more information.
 
Join Date: Mar 2006
Location: South Wales
Posts: 3,416 sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level)sync_or_swim User rank is General 12nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 2 Months 23 h 57 m 27 sec
Reputation Power: 1800
If you always want the value of Username to be the value of Request.ServerVariables("LOGON_USER") then why bother saving it to a variable, why not just grab the value of LOGON_USER on the final page. Alternatively, just save the value of LOGON_USER in a session variable on your first page, you can then access this on any page.
Code:
Session("Username") = Request.ServerVariables("LOGON_USER")

Reply With Quote
  #15  
Old July 8th, 2009, 06:22 AM
newtoasp_pk newtoasp_pk is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jul 2009
Posts: 103 newtoasp_pk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 22 m 32 sec
Reputation Power: 1
Quote:
Originally Posted by sync_or_swim
If you always want the value of Username to be the value of Request.ServerVariables("LOGON_USER") then why bother saving it to a variable, why not just grab the value of LOGON_USER on the final page. Alternatively, just save the value of LOGON_USER in a session variable on your first page, you can then access this on any page.
Code:
Session("Username") = Request.ServerVariables("LOGON_USER")

--------
Hmmm so to clarify it will be
Dim Username
Session("Username") = Request.ServerVariables("LOGON_USER")

and if I use a form variable(as Im required to do so) & submit it to the next page,moving backwards or forwards it will retain its value??

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > VBScript - General - Question - NT Logon


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump





 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
Stay green...Green IT