Connecting Tech Pros Worldwide Help | Site Map

How to get username on IIS run intranet (ASP)

  #1  
Old August 12th, 2008, 10:25 AM
Primoz Bradac
Guest
 
Posts: n/a
I have a .ASP page I'd like to make accessible only to selected users
who are logged on Windows workstations. The .ASP page is running under
IIS on a Windows 2003 Server (intranet).

Is there a way I could get to the username who requested the ASP page
(in the script of the .ASP page)?

TIA,
Primoz
  #2  
Old August 12th, 2008, 10:45 AM
Evertjan.
Guest
 
Posts: n/a

re: How to get username on IIS run intranet (ASP)


Primoz Bradac wrote on 12 aug 2008 in
microsoft.public.inetserver.asp.general:
Quote:
I have a .ASP page I'd like to make accessible only to selected users
who are logged on Windows workstations. The .ASP page is running under
IIS on a Windows 2003 Server (intranet).
>
Is there a way I could get to the username who requested the ASP page
(in the script of the .ASP page)?
The user browser usually has no access to the settings of that
pc/workstation, and the ASP runs on the server with it's own autorisation,
independent of the windows autorisation of the user.

Better do a seperate login, or check the local ip.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
  #3  
Old August 12th, 2008, 11:05 AM
Primoz Bradac
Guest
 
Posts: n/a

re: How to get username on IIS run intranet (ASP)


In article <Xns9AF875FD57E66eejj99@194.109.133.242>,
exjxw.hannivoort@interxnl.net says...
Quote:
the windows autorisation of the user
>
Thank you Evertjan for your answer!

My question was a little unclear. Of course server script can't access
workstation data. I just wondered if there is some "magic" way (eg. by
client script) to access user data in an *intranet* environment.

I'll go the separate login way...

Primoz
  #4  
Old August 12th, 2008, 12:15 PM
Bob Barrows [MVP]
Guest
 
Posts: n/a

re: How to get username on IIS run intranet (ASP)


Primoz Bradac wrote:
Quote:
I have a .ASP page I'd like to make accessible only to selected users
who are logged on Windows workstations. The .ASP page is running under
IIS on a Windows 2003 Server (intranet).
>
Is there a way I could get to the username who requested the ASP page
(in the script of the .ASP page)?
>
Of course there is. Use IIS Manager to turn off Anonymous Access and turn on
Integrated Security (this is done on the Directory Security tab of the
website Property pages, using the Edit button in the Anonymous Access and
authentication control section).

Once y9ou have done this, the user name will be in the LOGON_USER
servervariable:

Response.Write Request.ServerVariables("LOGON_USER")

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


  #5  
Old August 12th, 2008, 02:35 PM
Evertjan.
Guest
 
Posts: n/a

re: How to get username on IIS run intranet (ASP)


Bob Barrows [MVP] wrote on 12 aug 2008 in
microsoft.public.inetserver.asp.general:
Quote:
Primoz Bradac wrote:
Quote:
>I have a .ASP page I'd like to make accessible only to selected users
>who are logged on Windows workstations. The .ASP page is running
>under IIS on a Windows 2003 Server (intranet).
>>
>Is there a way I could get to the username who requested the ASP page
>(in the script of the .ASP page)?
>>
Of course there is. Use IIS Manager to turn off Anonymous Access and
turn on Integrated Security (this is done on the Directory Security
tab of the website Property pages, using the Edit button in the
Anonymous Access and authentication control section).
>
Once y9ou have done this, the user name will be in the LOGON_USER
servervariable:
>
Response.Write Request.ServerVariables("LOGON_USER")
While this is true, Bob,
I doubt if Primoz wants to change the whole IIS server,
[as this will prohibit any anonimous pages, meseems?]
but maybe I read the intentions wrongly.



--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
  #6  
Old August 12th, 2008, 02:55 PM
Bob Barrows [MVP]
Guest
 
Posts: n/a

re: How to get username on IIS run intranet (ASP)


Evertjan. wrote:
Quote:
Bob Barrows [MVP] wrote on 12 aug 2008 in
microsoft.public.inetserver.asp.general:
>
Quote:
>Primoz Bradac wrote:
Quote:
>>I have a .ASP page I'd like to make accessible only to selected
>>users who are logged on Windows workstations. The .ASP page is
>>running under IIS on a Windows 2003 Server (intranet).
>>>
>>Is there a way I could get to the username who requested the ASP
>>page (in the script of the .ASP page)?
>>>
>Of course there is. Use IIS Manager to turn off Anonymous Access and
>turn on Integrated Security (this is done on the Directory Security
>tab of the website Property pages, using the Edit button in the
>Anonymous Access and authentication control section).
>>
>Once y9ou have done this, the user name will be in the LOGON_USER
>servervariable:
>>
>Response.Write Request.ServerVariables("LOGON_USER")
>
While this is true, Bob,
I doubt if Primoz wants to change the whole IIS server,
[as this will prohibit any anonimous pages, meseems?]
but maybe I read the intentions wrongly.
>
I left out the part where he should change the properties of the
specific website ... sorry.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
.Net frameword Resources ( vb.net , asp.net etc...) shamirza answers 0 January 17th, 2007 08:05 AM
REPOST: Error Using WMI to Get List of Shared Folders on the Server lecnac answers 1 April 24th, 2006 11:55 PM
how can you use mshtml DOM object to grab rendered asp.net page? Randall Arnold answers 24 January 5th, 2006 05:15 PM
How to get current logged in Windows username? John Dalberg answers 6 November 19th, 2005 09:57 AM