Re: How to get UserName / NetBios machine name using FORMS authentication
From: Ed leNoir (edleno@safeco.com)
Date: 10/31/02
- Next message: Kevin Yu: "Re: How to use WindowsPrincipal properly??"
- Previous message: Ed leNoir: "Re: SOLVED: How do I give ASP.NET process network credentials?"
- In reply to: Joao.Cardoso: "How to get UserName / NetBios machine name using FORMS authentication"
- Next in thread: Joao.Cardoso: "Re: How to get UserName / NetBios machine name using FORMS authentication"
- Reply: Joao.Cardoso: "Re: How to get UserName / NetBios machine name using FORMS authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Ed leNoir" <edleno@safeco.com> Date: Thu, 31 Oct 2002 13:14:34 -0800
I'm not sure what machine name you are referring to. On my web farm I get
the dns name of the server for logging all the time. Use the namespace
System.Net, and the static function Dns.GetHostName(). This returns the
current server that you are running under.
If you want the machine name a user is running from I don't know any way to
do that myself.
For the user you should get the user out of the http context. Any aspnet
page can do this thru the User property it inherits from Page. For example,
in a vb page code me.User.Name to get the current user name and NOT the
aspnet or other impersonated name.
- Ed
"Joao.Cardoso" <joao.cardoso@gmx.no.spam.net> wrote in message
news:s7jvrush66e89s66anjlu7rnqk4kq3n766@4ax.com...
> Hi
>
> I'm using Forms authentication but I still need to know the NetBios
> machine name and the user logged on on windows domain, using the
> browser IE to access my ASP.NET application.
>
> I need this information in order to be able to LOG with users is using
> the software on witch workstation (with dynamic IP addess) width witch
> windows logon on the workstation. This is a requirement for security
> reasons.
>
> The problem is that using Forms authentication, accessing the
> servervariables allways returns either ASP.NET user account or the
> Forms autenticated user....
>
> I need to know if is there any way to get that information, even
> assuming that I'm using IE5 or later.
>
> Again, Mind that I'm using Forms authentication
>
> Thanks in advance
>
> Joao.Cardoso
> =============================================
> [LusoCoders]- Portuguese Coders
> lusocoders-subscribe@yahoogroups.com
> =============================================
- Next message: Kevin Yu: "Re: How to use WindowsPrincipal properly??"
- Previous message: Ed leNoir: "Re: SOLVED: How do I give ASP.NET process network credentials?"
- In reply to: Joao.Cardoso: "How to get UserName / NetBios machine name using FORMS authentication"
- Next in thread: Joao.Cardoso: "Re: How to get UserName / NetBios machine name using FORMS authentication"
- Reply: Joao.Cardoso: "Re: How to get UserName / NetBios machine name using FORMS authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|