IIS
(1)
Directory
(1)
Windows
(1)
Request.servervariables
(1)
Anonymouse
(1)
Freaken
(1)
Month
(1)

Getting a AD user name ...

Asked By David Lozzi
03-Dec-07 11:59 AM
Howdy,

I have an ASP.Net 2.0 web application for which all i need to do is grab the
user's login name. Currently, IIS is configured for anonymous access, which
i need to keep. I tried request.servervariables("LOGON_USER") and
REMOTE_USER, both return nothing. If I disable anonymouse security in IIS it
works and returns my login name.

I have also enabled forms authentication on my application, see below, and i
simply get page cannot be found, which is getting annoying. I don't need to
do anything with AD except get the user name, so using the full membership
class for AD is a little over kill. I am storing all of the user's
permissions for the app in the application using basic session strings. But
i'll do what it takes. Any ideas??

connectionString="LDAP://delphi.local/CN=Users,DC=delphi,DC=local" />

type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString" connectionUsername="delphi\dlozzi"
connectionPassword="12345"/>

Thanks!!

David Lozzi
Blog: http://www.lozzi.net

Why not just enable Windows authentication in IIS?

Asked By Joe Kaplan
03-Dec-07 07:59 PM
Why not just enable Windows authentication in IIS?  It is by far the easiest
way to go.  What is the attraction with doing forms authentication?

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--

I did. I don't know why I wanted forms auth...

Asked By David Lozzi
11-Dec-07 01:21 PM
I did. I do not know why I wanted forms auth... been a long freaken month

Thanks
Post Question To EggHeadCafe