RE: How to get the login from IIS in C#
From: DJe (dje@perso.be)
Date: 08/01/02
- Next message: JTY: "Re: Error with RSACryptoServiceProvider"
- Previous message: Philip Stears: "ASP.NET and Access Denied Exceptions"
- In reply to: Jason Jing: "RE: How to get the login from IIS in C#"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "DJe" <dje@perso.be> Date: Thu, 1 Aug 2002 05:34:43 -0700
Excellent! Magnifique de beautée! ;-)
Merci beaucoup!
¡Muchas gracias!
Dank u well!
Thank you very much!
There is my solution with your help:
{
String pass;
pass=Context.User.Identity.Name.ToString();
edt_Login.Text=pass.Substring(pass.LastIndexOf('\\')+1);
}
Context.User.Identity.Name give the "domain\login"
Have a nice day!
Jérôme
>-----Original Message-----
>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!
>|
>|
>
>.
>
- Next message: JTY: "Re: Error with RSACryptoServiceProvider"
- Previous message: Philip Stears: "ASP.NET and Access Denied Exceptions"
- In reply to: Jason Jing: "RE: How to get the login from IIS in C#"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|