RE: How to get the login from IIS in C#

From: Jason Jing (zyjing@online.microsoft.com)
Date: 07/31/02


From: zyjing@online.microsoft.com (Jason Jing)
Date: Wed, 31 Jul 2002 05:59:25 GMT


Hello,

Based on my understanding, you want to use Windows authentication instead
of Form Authentication. If it is, you need to change your web.config file
to the following

        <authentication mode="Windows">
        </authentication>

At the same time, client need to login to domain to avoid message box from
pop up in IE window.

If you want to get the identity of the user, you can use
context.User.Identity to return the login domain and name.

Jason Jing
Microsoft Support
This posting is provided "AS IS", with no warranties, and confers no rights.

| Content-Class: urn:content-classes:message
| From: "DJe" <dje@perso.be>
| Sender: "DJe" <dje@perso.be>
| Subject: How to get the login from IIS in C#
| Date: Mon, 29 Jul 2002 10:09:29 -0700
| Lines: 30
| Message-ID: <1e3a01c23722$b36baff0$a4e62ecf@tkmsftngxa06>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcI3IrNrqtppdoIcQbCuQJfI1SLVfA==
| Newsgroups: microsoft.public.dotnet.framework.aspnet.security
| Path: cpmsftngxa07
| Xref: cpmsftngxa07 microsoft.public.dotnet.framework.aspnet.security:1735
| NNTP-Posting-Host: TKMSFTNGXA06 10.201.232.165
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
|
| Hi all!
|
| I made my webconf like this :
| <authentication mode="Forms">
| <forms name="blabla!!!" LoginUrl="AccessOK.aspx"/>
| </authentication>
| <authorization>
| <deny users="?"/>
| </authorization>
|
|
| So i need to make the cookie. But i'm asking a login from
| windows under IIS...
| (under IIS right click, properties, secure directory,
| uncheck the first checkbox and check the last one - Anonym
| access and Integrated Win authentification -> sorry for
| the spelling my win is in french)
|
| I'm asking this login from Windows(NT PDC) because it's
| for a LAN...And it should be more easy to manage than make
| a User DB...
|
|
| There is a couple of hours, i'm looking to solve this
| problem.
|
| Is it possible to take it under C#?
|
| If someone can help me. Thank you!
|
|



Relevant Pages

  • Re: Can login domain be set to a default?
    ... need for specifying a login domain. ... accounts of the IIS box (and the login process needs a way to ... cannot specify a default domain for Windows integrated authentication ... > The internal domain for the three servers is different than the web site ...
    (microsoft.public.windows.server.security)
  • Re: Windows Authentication method on IIS6
    ... The microsoft.public.windows.server.* groups deal with Windows 2003 ... The microsoft.public.inetserver.* groups deal with IIS ... > the authentication button, ... You can configure either one or multiple realm names on a server running IIS ...
    (microsoft.public.win2000.security)
  • Re: How to access Windows IIS User Info with Perl
    ... but the IIS server is configured for Windows ... allowed for Basic Authentication, Windows Authentication (or whatever ... Do you know if they are part of a standard ...
    (comp.lang.perl.misc)
  • Windows Authentication with IIS on separate machines
    ... Yes, setting Basic Authentication in IIS works, but the ... >in SQL server but doesn't work if user account was ... >imported from a Windows account. ...
    (microsoft.public.sqlserver.security)
  • Re: Change in ASP.Net authentication between Win2000 and Win2003
    ... IIS Resource Guide). ... I next looked a little into Windows 2003. ... IMHO, the label on the option, "Enable Integrated Windows Authentication", ... the documentation leads one to ...
    (microsoft.public.inetserver.iis.security)