Author |
Message |
Michael Gall #1 / 18
|
 Retrieve User NT login
Hi I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP pages running on IIS accessing SQL Svr. Users connect anonymously. How can I retrieve the user's NT login account name? (VBScript/JavaScript running...?) Thanks -mike
|
Sat, 07 Sep 2002 03:00:00 GMT |
|
 |
Miguel Ferreir #2 / 18
|
 Retrieve User NT login
you can retrive the NT user logged onto your application. as I know you cannot retrieve the LOCALLY logged user. request.servervariables("Logon_user") -- Miguel Ferreira
Quote: > Hi > I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP pages > running on IIS accessing SQL Svr. Users connect anonymously. > How can I retrieve the user's NT login account name? (VBScript/JavaScript > running...?) > Thanks > -mike
|
Sat, 07 Sep 2002 03:00:00 GMT |
|
 |
Tom Kaminsk #3 / 18
|
 Retrieve User NT login
remove anonymous access and in asp reference: Request.ServerVariables("LOGON_USER")
Quote: > Hi > I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP pages > running on IIS accessing SQL Svr. Users connect anonymously. > How can I retrieve the user's NT login account name? (VBScript/JavaScript > running...?)
|
Sat, 07 Sep 2002 03:00:00 GMT |
|
 |
Michael Harri #4 / 18
|
 Retrieve User NT login
"...Users connect anonymously..." Therefore you can't - Request.ServerVariables("Logon_user") will be blank. I you disable Anonymous and use NT Challenge/Response or Basic Authentication, you can. -- Michael Harris MVP Scripting
you can retrive the NT user logged onto your application. as I know you cannot retrieve the LOCALLY logged user. request.servervariables("Logon_user") -- Miguel Ferreira
Quote: > Hi > I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP pages > running on IIS accessing SQL Svr. Users connect anonymously. > How can I retrieve the user's NT login account name? (VBScript/JavaScript > running...?) > Thanks > -mike
|
Sat, 07 Sep 2002 03:00:00 GMT |
|
 |
Michael Gall #5 / 18
|
 Retrieve User NT login
Would be a piece of cake with it, but I HAVE to use anonymous access. I thought there are some addin-scripts around to get the NT login..... -gg
Quote: > "...Users connect anonymously..." > Therefore you can't - Request.ServerVariables("Logon_user") will be blank. > I you disable Anonymous and use NT Challenge/Response or Basic
Authentication, you can. Quote: > -- > Michael Harris > MVP Scripting
Quote: > you can retrive the NT user logged onto your application. > as I know you cannot retrieve the LOCALLY logged user. > request.servervariables("Logon_user") > -- > Miguel Ferreira
> > Hi > > I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP pages > > running on IIS accessing SQL Svr. Users connect anonymously. > > How can I retrieve the user's NT login account name?
(VBScript/JavaScript Quote: > > running...?) > > Thanks > > -mike
|
Sat, 07 Sep 2002 03:00:00 GMT |
|
 |
Adrian Forbe #6 / 18
|
 Retrieve User NT login
With anon access the only way is a client-side ActiveX control. You'd need to write it yourself (easy, can't be more than 4 lines of code) or find one that already does what you want. Then get them all signed as safe to use.
|
Sat, 07 Sep 2002 03:00:00 GMT |
|
 |
Michael Gall #7 / 18
|
 Retrieve User NT login
... will that also run on non-MS browsers? Do you know some existing solutions around? Thank you Mike
Quote: > With anon access the only way is a client-side ActiveX control. You'd need > to write it yourself (easy, can't be more than 4 lines of code) or find one > that already does what you want. Then get them all signed as safe to use.
|
Sun, 08 Sep 2002 03:00:00 GMT |
|
 |
Adrian Forbe #8 / 18
|
 Retrieve User NT login
Quote: > ... will that also run on non-MS browsers?
Not if they don't support ActiveX controls.
|
Sun, 08 Sep 2002 03:00:00 GMT |
|
 |
Michael Gall #9 / 18
|
 Retrieve User NT login
What about NN in that case?
Quote: > > ... will that also run on non-MS browsers? > Not if they don't support ActiveX controls.
|
Sun, 08 Sep 2002 03:00:00 GMT |
|
 |
Adrian Forbe #10 / 18
|
 Retrieve User NT login
Quote: > What about NN in that case?
This is microsoft.public.inetserver.asp.db. A client-side object getting the logged on user via NN is neither MS, IIS nor ASP. Try a client-side NN group.
|
Sun, 08 Sep 2002 03:00:00 GMT |
|
 |
Michael Harri #11 / 18
|
 Retrieve User NT login
NN doesn't support ActiveX... -- Michael Harris MVP Scripting
What about NN in that case?
Quote: > > ... will that also run on non-MS browsers? > Not if they don't support ActiveX controls.
|
Sun, 08 Sep 2002 03:00:00 GMT |
|
 |
Jan Geert He #12 / 18
|
 Retrieve User NT login
If you want to get the username that is currently logged in on the server itself, not through iis. You can get by making a VB DLL which calls the getusername function. The vb code should look like this: Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long Public Function GetCurrentUser() As String Dim strWork as string strWork = Space(255) GetUserName strWork, 255 GetCurrentUser = Left(strWork, InStr(strWork, Chr(0)) - 1) End Function Hope this helps, Jan Geert Hek
Quote: > Would be a piece of cake with it, but I HAVE to use anonymous access. > I thought there are some addin-scripts around to get the NT login..... > -gg
> > "...Users connect anonymously..." > > Therefore you can't - Request.ServerVariables("Logon_user") will be blank. > > I you disable Anonymous and use NT Challenge/Response or Basic > Authentication, you can. > > -- > > Michael Harris > > MVP Scripting
> > you can retrive the NT user logged onto your application. > > as I know you cannot retrieve the LOCALLY logged user. > > request.servervariables("Logon_user") > > -- > > Miguel Ferreira
> > > Hi > > > I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP > pages > > > running on IIS accessing SQL Svr. Users connect anonymously. > > > How can I retrieve the user's NT login account name? > (VBScript/JavaScript > > > running...?) > > > Thanks > > > -mike
|
Mon, 09 Sep 2002 03:00:00 GMT |
|
 |
Geoff Wil #13 / 18
|
 Retrieve User NT login
Okay, if you can't get the username (anonymously), is there a way to get the "Computer Name"? Rgds...Geoff
Quote: > Hi > I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP pages > running on IIS accessing SQL Svr. Users connect anonymously. > How can I retrieve the user's NT login account name? (VBScript/JavaScript > running...?) > Thanks > -mike
|
Mon, 09 Sep 2002 03:00:00 GMT |
|
 |
Richard Coo #14 / 18
|
 Retrieve User NT login
I don't believe so. I think the server variable will always return the IP. <%=Request.ServerVariables("REMOTE_HOST") %> -- Richard Cook NetData4 http://www.netdata4.net --- Please respond in the newsgroup so that others may participate in the thread. ---
Quote: > Okay, if you can't get the username (anonymously), is there a way to get the > "Computer Name"? > Rgds...Geoff
> > Hi > > I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP pages > > running on IIS accessing SQL Svr. Users connect anonymously. > > How can I retrieve the user's NT login account name?
(VBScript/JavaScript Quote: > > running...?) > > Thanks > > -mike
|
Mon, 09 Sep 2002 03:00:00 GMT |
|
 |
Geoff Wil #15 / 18
|
 Retrieve User NT login
Yes...that's what I'm doing now......we have a little online helpdesk - it would be nice to get the user's pc name.... Ah well...I'll keep trying... Rgds...Geoff
Quote: > I don't believe so. I think the server variable will always return the IP. > <%=Request.ServerVariables("REMOTE_HOST") %> > -- > Richard Cook > NetData4 > http://www.netdata4.net > --- > Please respond in the newsgroup so that > others may participate in the thread. > ---
> > Okay, if you can't get the username (anonymously), is there a way to get > the > > "Computer Name"? > > Rgds...Geoff
> > > Hi > > > I have the following environment: SQL Svr 7, IIS 4, NT4 clients. ASP > pages > > > running on IIS accessing SQL Svr. Users connect anonymously. > > > How can I retrieve the user's NT login account name? > (VBScript/JavaScript > > > running...?) > > > Thanks > > > -mike
|
Mon, 09 Sep 2002 03:00:00 GMT |
|
|