Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1095
  • Last Modified:

Problem in retrieving Windows NT user (Remote_user) from ASP

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
yvsubash
Asked:
yvsubash
1 Solution
 
jitgangulyCommented:
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
 
yvsubashAuthor Commented:
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
 
yvsubashAuthor Commented:
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
daniel_cCommented:
Have you checked the user permissions on your web folder?
It should be "read" permission at least for "everyone".
0
 
jitgangulyCommented:
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
 
yvsubashAuthor Commented:
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
 
jitgangulyCommented:
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
 
jitgangulyCommented:
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
 
yvsubashAuthor Commented:
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
 
yvsubashAuthor Commented:
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
 
G2MDCommented:
Please, tell me what you did, because I have a problem like this.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now