Solved

Problem in retrieving Windows NT user (Remote_user) from ASP

Posted on 2001-06-06
11
1,090 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Suggested Solutions

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 informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
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…

738 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