I have a problem with ("auth_user" ) in asp,I try to use windows
username and password in asp page for limitation user access to pages,
but this server variable returns empty string, can you help me ,I
appreciate it. 5 5464 ni******@yahoo. com wrote: I have a problem with ("auth_user" ) in asp,I try to use windows username and password in asp page for limitation user access to pages, but this server variable returns empty string, can you help me ,I appreciate it.
Hi nikou_70,
You have to either deactivate the "windows logon" checkbox in the IIS
Server configuration (under Security) so that only "anonymous" and
"basic authentication" is active
or if you are using a Active Directory Domain, you can get the user
information with the ADSystemInfo Object:
Example Code:
<%
Dim oAD,oUser,strUs erDN,strUserNam e,strFullName
Set oAD = Server.CreateOb ject("ADSystemI nfo")
On Error Resume Next 'disable Error Checking
strUserDN = oAD.UserName
Set oAD = Nothing
If Err = 0 Then 'no error occured
On Error Goto 0 'enable Error Checking
Set oUser = GetObject("LDAP ://" & strUserDN)
strUserName = oUser.SamAccoun tName
strFullName = oUser.FullName
Set oUser = Nothing
Response.Write "You are User [" & strFullName & _
"] with Username [" & strUserName & "]."
Else
On Error Goto 0 'enable Error Checking
Response.Write "ERROR: You are no Active Directory User!"
End If
%>
HTH
Gottfried
Gottfried Mayer wrote: ni******@yahoo. com wrote: I have a problem with ("auth_user" ) in asp,I try to use windows username and password in asp page for limitation user access to pages, but this server variable returns empty string, can you help me ,I appreciate it.
Hi nikou_70,
You have to either deactivate the "windows logon" checkbox in the IIS
No, he wants to use "windows usename" Why would you advise him to deactivate
the windows logon checkbox??
He has to turn off Anonymous Access in order to see anything in "auth_user"
or "logon_user ", which is the one I use. or if you are using a Active Directory Domain, you can get the user information with the ADSystemInfo Object:
That's not true.
--
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" ni******@yahoo. com wrote: I have a problem with ("auth_user" ) in asp,I try to use windows username and password in asp page for limitation user access to pages, but this server variable returns empty string, can you help me ,I appreciate it.
You forgot to diable "Anonymous" access in IIS Manager.
I prefer to use "logon_user ", but "auth_user" should work as well.
Bob Barrows
--
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"
Bob Barrows [MVP] wrote: Gottfried Mayer wrote:
ni******@yaho o.com wrote:
I have a problem with ("auth_user" ) in asp,I try to use windows username and password in asp page for limitation user access to pages, but this server variable returns empty string, can you help me ,I appreciate it.
Hi nikou_70,
You have to either deactivate the "windows logon" checkbox in the IIS
No, he wants to use "windows usename" Why would you advise him to deactivate the windows logon checkbox??
He has to turn off Anonymous Access in order to see anything in "auth_user" or "logon_user ", which is the one I use.
or if you are using a Active Directory Domain, you can get the user information with the ADSystemInfo Object:
That's not true.
Hi Bob,
You're right, of course...
If you only want authenticated users to access your page (anonymous
users from outside your company will have to log on before they see
anything), you just have to deactivate the "anonymous access" in IIS
I'm currently working on a project that uses mixed
anonymous/authenticated Access to display different (public and
internal) data, there I had to configure IIS like I stated in my last
post, and I used the ADSystemInforma tion to get the current user (with
Group membership and the whole show...)
Maybe I am a bit confused right now.
Gottfried
Gottfried Mayer wrote: I'm currently working on a project that uses mixed anonymous/authenticated Access to display different (public and internal) data, there I had to configure IIS like I stated in my last post, and I used the ADSystemInforma tion to get the current user (with Group membership and the whole show...)
Ahh, that explains it...
--
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Reader |
last post by:
I have an application that allows a user to enter a user name, user password, and the domain or machine name. From this information I would like to verify the user account and password is valid. This must work for either a domain or a local machine account. I have tried to find examples from the web and it seems every example that I have found...
|
by: pberna |
last post by:
Dear all,
I built a Web Form application to start and stop a Windows Service remotely.
I successful tested the application on Windows 2000 server + IIS. I must
include the ASPNET user
to the Administration group (on server side) to have the necessary
authorization to start a Windows Service (I don't understand why "Power
User" rights are...
|
by: James |
last post by:
I have a VB windows forms application that accesses a Microsoft Access
database that has been secured using user-level security. The
application is being deployed using No-Touch deployment. The objective
in utilizing this new deployment method is to reduce the maintenance
overhead as well as making it easier for my users to setup and run the...
|
by: Hriday |
last post by:
Hi there, Please help me..It is urgent
This is Hriday, working on windows authentication with
Active Directory...
My requirment is when a user sends a request to my web
Applicatoin I want to Pop up windows Authentication box so
that user will give his userId, Password & domain name for
authenticaion. After that I want to take these...
|
by: Sudhakara.T.P. |
last post by:
Hi,
I have an application in VB.NET windows application, wherein the
administrator has the option to change the authentication mode ie., whether
the application should work as a normal database authentication or the
windows based authentication mode.
If the administrator sets the application authentication mode to windows
based, then the...
| |
by: mfunkmann |
last post by:
Hi,
I recently got an error and I don't know how to fix it:
Error 1 'System.Data.DataColumn' does not contain a definition for
'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO
I am note sure what to do because all propertiers work, except the
System.Data.DataColumn..
I didn't write any code by hand and used the visual studio...
|
by: =?Utf-8?B?Qi5BaGxzdGVkdA==?= |
last post by:
Hi all,
This is something that I have been toying with for about a week now. What
I want to achieve is Install a Service with Customised parameters (using
InstallUtil.exe) for User Name. Example (C#);
public class MyServiceInstaller : System.Configuration.Install.Installer
{
private System.ServiceProcess.ServiceProcessInstaller...
|
by: Carl |
last post by:
In ASP.Net, how can we connect to a nas that uses cifs for its file
sharing protocol. Currently we should be able to provide the ip address
or hostname of the nas, the sharename along with any directories to go
directly into that sharename, and the username and password. This
username and password will not be on the server hosting the...
|
by: =?Utf-8?B?QXZhRGV2?= |
last post by:
ASP.Net 2.
We are migrating to Windows 2008 64 bit Server with IIS 7 from Windows 2003
32 Bit with IIS 6. A few library classes we wrote uses impersonation in code
like explained in this article:
http://support.microsoft.com/?id=306158#4
This doesn't work in Windows 2008 Server, we receive the following exception:
|
by: Prof. William Battersea |
last post by:
Hello,
Suppose I have a Vista machine called VISTA and an XP machine called
XP in a workgroup named WORKGROUP. Physically they're connected to a
router and I can see lists of public and shared files on each of them.
How do I address these for IO?
A search suggested that the form open(r"\\server\folder\folder"), but
I tried many...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |