Ok. I should read to the end, before I click the "Reply Group" - Button!
"JZ" <(E-Mail Removed)> wrote in message
news:%23p4xJ%(E-Mail Removed)...
> Jerry's suggestion of using DsRoleGetPrimaryDomainInformation worked like
a
> charm. Thank you very much.
>
> Gunter - see my original post for why UserDomainName did not meet my
needs.
>
> If anyone is curious, I also tried using the System.Management namespace.
I
> believe that it could have provided me with the information that I was
> looking for but permissions on "root\CIMV2" wouldn't allow ASPNET to
> retrieve the information (and I didn't feel like changing the security).
>
> "Günter Prossliner" <(E-Mail Removed)> wrote in message
> news:#(E-Mail Removed)...
> > string domain = Environment.UserDomainName;
> >
> > GP
> >
> > "JZ" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > Hi,
> > >
> > > At run-time, I need to determine the domain on which the server is
> > currently
> > > joined. System.Environment doesn't provide me with the information
that
> I
> > > need through the UserDomainName property because that is the network
> > domain
> > > name associated with the current user. I need to know the domain (if
the
> > > server is currently logged on) like "mydomain.com".
> > >
> > > Thank you in advance.
> > >
> > > JZ
> > >
> > >
> >
> >
>
>
|