Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Get full-qualified user-domain in asp.net

Reply
Thread Tools

Get full-qualified user-domain in asp.net

 
 
Markus Strobl
Guest
Posts: n/a
 
      06-02-2008
Hi!

I'm currently developing an ASP.NET application which uses Windows
Integrated Security to display different data depending on the Windows User
how requests the page.

So far so good but i also need to get the full qualified name of the user
domain visiting the page to make my app work properly.

I'm currently reading the logged on user by a call to
Request.ServerVariables["LOGON_USER"] but this call will only give me the
short domain name (i.e. i get "myDomain\Markus" but i need
"myDomain.rbgooe.at\Markus").

Is there any way to do it using ASP.NET technology? Or will i have to use
ActiveDirectory-Queries to resolve the domain name?

Thanks a lot for any advice!

Greetings

Markus


 
Reply With Quote
 
 
 
 
Markus Strobl
Guest
Posts: n/a
 
      06-02-2008
ok i was able to solve the problem on my own using .net active directory
support :

the following call gave me just what i needed:
System.DirectoryServices.ActiveDirectory.Domain domain =
System.DirectoryServices.ActiveDirectory.Domain.Ge tCurrentDomain();

Description from MSDN: "... Gets the Domain object for the current user
credentials in effect for the security context under which the application
is running...."

Greetings

Markus





"Markus Strobl" <> schrieb im
Newsbeitrag news:%23d8%235$...
> Hi!
>
> I'm currently developing an ASP.NET application which uses Windows
> Integrated Security to display different data depending on the Windows
> User how requests the page.
>
> So far so good but i also need to get the full qualified name of the user
> domain visiting the page to make my app work properly.
>
> I'm currently reading the logged on user by a call to
> Request.ServerVariables["LOGON_USER"] but this call will only give me the
> short domain name (i.e. i get "myDomain\Markus" but i need
> "myDomain.rbgooe.at\Markus").
>
> Is there any way to do it using ASP.NET technology? Or will i have to use
> ActiveDirectory-Queries to resolve the domain name?
>
> Thanks a lot for any advice!
>
> Greetings
>
> Markus
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get ubuntu ! Get ubuntu ! Get ubuntu ! Get ubuntu ! Getubuntu Windows 64bit 1 06-01-2009 08:54 AM
-Re: Re: Serious cache problem - Page_Load get never get called !!! Ryan Park ASP .Net 0 01-04-2005 06:09 PM
Serious cache problem - Page_Load get never get called !!! Ryan Park ASP .Net 2 01-03-2005 05:52 PM
Re: use anonymous but get get an authentication box Curt_C [MVP] ASP .Net 2 09-21-2004 06:39 PM
use anonymous but get get an authentication box =?Utf-8?B?U2hhcmlm?= ASP .Net 0 09-21-2004 01:01 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57