.NET Framework - 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
IIS
(1)
Directory
(1)
Windows
(1)
Request.servervariables
(1)
Anonymouse
(1)
Freaken
(1)
Month
(1)
Joe Kaplan replied...
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
--
David Lozzi replied...
I did. I do not know why I wanted forms auth... been a long freaken month
Thanks
SSL in IIS of windows xp .NET Framework Can you use SSL with the IIS of windows xp professonal? ASP.NET Security Discussions IIS (1) Directory (1) Professonal (1) Windows (1) SSL (1) Yes. Joe K. - - Joe Kaplan-MS MVP Directory Services Programming Co-author of "The .NET Developer's Guide to Directory Services Programming" http
ASP.NET Application using Virtual path provider Deployement Problem on IIS windows Server 2003 .NET Framework I have made an Aplication use VPP and make deploy for it on IIS on windows 2003 Server 1- built the web Application with Asp.net2 2- Implement the Virtual path provider (Virtual path , virtual Directory , Virtual File) in this Application to call Virtual file or virtual directory 3 - I finished the Application but I need to make deploy for this Application on IIS 6 on windows 2003 server 4- If I run this application using the VSS.net it work well
Creating a virtual Directory using IIS .NET Framework Hello, I had installed IIS 6 Manager in my Windows XP Professional using SP 3, I try to create a virtual directory using IIS, I googled and what I could not able to understand is that there is no drop down list in the IIS to go to the default websites and create a virtual directory. I mean there is no + icon to expand the IIS services. Can anyone please help
access denied when accessing IIS directory .NET Framework Hello everyone, When executing the following script in PowerShell, there is always access siteName = (Get-Wmiobject -computer "TestMachine" -namespace ServerComment = "Default Web Site").Name regards, George Powershell Discussions IIS (1) MicrosoftIISv2 (1) ScriptFanatic (1) ServerComment (1) TestMachine (1) Wmiobject (1) Windows (1) Directory (1) Hello George, Try: 1. Click 'Start | run' type: dcomcnfg and press enter 2. On internet services on this computer' checkbox. 5. Restart the machine and try again. - -- Shay Levy Windows PowerShell MVP http: / / blogs.microsoft.co.il / blogs / ScriptFanatic G> Hello everyone, G> G> When still not working. Any ideas to analyze further? regards, George keywords: access, denied, when, accessing, IIS, directory description: Hello everyone, When executing the following script in PowerShell, there is always access denied
Is the aspnet account called "aspnet" for all non-English versions of Windows and IIS? .NET Framework Is the aspnet account called "aspnet" for all non-English versions of Windows and IIS? ASP.NET Discussions IIS (1) XP (1) Application (1) Computer (1) Local (1) Yes, for Windows XP in all languages. For Windows 2003 Server, the aspnet account is "network service". Juan T. Llibre, asp.net MVP asp ie under Computer Management -> Local Users and Groups -> Users). However, "Network Service" does appear in IIS's Application Pool Identity dialog. The reason for my post is that I have a