Solved

Problem in retrieving Windows NT user (Remote_user) from ASP

Posted on 2001-06-06
11
1,085 Views
Last Modified: 2008-02-01
I'm trying to get the Servervariables("Remote_user") from ASP and the authentication on the IIS is Anonymous and Basic. However, I still can't get the Windows NT user logged onto the web server. It returns an empty string. Can anyone throw some light on this.
0
Comment
Question by:yvsubash
11 Comments
 
LVL 20

Expert Comment

by:jitganguly
ID: 6161127
You have to set windows NT challenge/Response option checked to get values in Servervariables("Remote_user") or Servervariables("Logon_user")

Try this code for all server vars
<%@ LANGUAGE="VBSCRIPT" %>

<html>
<head>
     <title>Untitled</title>
</head>

<body>
<TABLE BORDER="1">
<TR><TD><B>Server Variable</B></TD><TD><B>Value</B></TD></TR>
<% For Each strKey In Request.ServerVariables %>
<TR><TD> <%= strKey %> </TD><TD>  <%= Request.ServerVariables(strKey) %> </TD></TR>
<% Next %>
</TABLE>
</body>
</html>
0
 

Author Comment

by:yvsubash
ID: 6161173
jitganguly,

Thanks for the response but I already tried that option and getting the following error. Any other Ideas

HTTP Error 401
401.2 Unauthorized: Logon Failed due to server configuration

This error indicates that the credentials passed to the server do not match the credentials required to log on to the server. This is usually caused by not sending the proper WWW-Authenticate header field.

Please contact the Web server's administrator to verify that you have permission to access to requested resource.
0
 

Author Comment

by:yvsubash
ID: 6161178
jitganguly,

Thanks for the response but I already tried that option and getting the following error. Any other Ideas

HTTP Error 401
401.2 Unauthorized: Logon Failed due to server configuration

This error indicates that the credentials passed to the server do not match the credentials required to log on to the server. This is usually caused by not sending the proper WWW-Authenticate header field.

Please contact the Web server's administrator to verify that you have permission to access to requested resource.
0
 
LVL 7

Expert Comment

by:daniel_c
ID: 6161200
Have you checked the user permissions on your web folder?
It should be "read" permission at least for "everyone".
0
 
LVL 20

Accepted Solution

by:
jitganguly earned 150 total points
ID: 6161235
When you check WIndows NT challenge/Response ONLY, then it will validate the pages according to NT userid/password and everytime you go to a page it will prompt you for userid/password. Make sure you have only checked NT challenge/Response and others such as basic authertication etc. are all uncheked.
Now does this user have access to view those pages. I mean when you get the userid/password box the user you specify should have permission to see thso epages. Check that from MMC/properties/Home director or virtual directory /permissions. You shoud see 3 radio buttons and check script radio button at least
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:yvsubash
ID: 6161293
The Web folder has full Control to everyone.

Also the Windows NT Challenge/Response alone is checked.
The user has permissions to see those pages and SCript radio button is checked.

Could there be a problem with ISAPI filter configuration or something like that?
0
 
LVL 20

Expert Comment

by:jitganguly
ID: 6161429
Hmmm.
"Could there be a problem with ISAPI filter configuration or something like that?"
I don't think so. But you can disable for the time being and check.

Now does this user have access to login to this server. WHy don't you add a user in the server machine and test it first
0
 
LVL 20

Expert Comment

by:jitganguly
ID: 6161462
You are getting
"Unauthorized: Logon Failed due to server configuration" and you said
"Web folder has full Control to everyone"

I have a feeling the user you are entering does not have any rights to the server domain/machine. Check that
0
 

Author Comment

by:yvsubash
ID: 6165573
I figured out that there is a problem when dealing with proxy servers. I have a work around for this by creating an alias for the web site there by passing the User ID to everywhere.
0
 

Author Comment

by:yvsubash
ID: 6167954
I found the answer to this question by self and nobody were able to give the right solution even though I appreciate their efforts.
0
 

Expert Comment

by:G2MD
ID: 6834577
Please, tell me what you did, because I have a problem like this.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now