Re: Network login and e-mail address

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You can use Environment.UserDomainName if the application is WinForms one
and HttpContext.Current.User.Identity.Name if you are in the ASP.NET
application.

Once you've obtained the domain name
System.DirectoryServices namespace will help you. It contains necessary
classess to query Active Directory for the info you need.
It uses LDAP pathes. Outlook Exchange server can also be queried in the same
way.


--
Vadym Stetsyak aka Vadmyst
http://vadmyst.blogspot.com


"Bruce Wood" <brucewood@xxxxxxxxxx> wrote in message
news:1129078054.358344.268580@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I've been mucking about with Environment.UserName and similar
> properties in .NET. I can get the user's login name for their machine,
> but unfortunately that doesn't get me much for users logged into our
> corporate network through laptops: all its gets me is their user ID on
> the laptop, which means nothing at the corporate level.
>
> Does anyone know how I can get my hands on the username that was used
> to log into Microsoft Networking? This is our corporate user name and
> it's what I should be using to stamp record updates, etc.
>
> As well, does anyone know how to get my hands on the user's default
> e-mail address, the one that Outlook (et al) uses by default when you
> send an e-mail message?
>


.



Relevant Pages

  • RE: Home laptops on a corporate network
    ... The places I come as a systems consultant don't use the measures you are ... Home laptops on a corporate network ... users are required to bring their laptops into the office ... Wouldn't a regular vpn just open for all kinds of badware they have on ...
    (Security-Basics)
  • RE: Home laptops on a corporate network
    ... where would there be data leakage with TS and proper firewalls and policies to prevent sharing of client hard drives? ... Home laptops on a corporate network ... They're bound by HIPAA, and still want this? ...
    (Security-Basics)
  • RE: Home laptops on a corporate network
    ... I take it assigning the users who need to work from home company owned/managed laptops, and then providing VPN access to these laptops, is just not an option? ... Setting up -somewhat- secure access to the corporate network from a staffers home computer just seems like too much trouble and too much risk for what you gain...it'd just be easier to buy/image/issue laptops. ...
    (Security-Basics)
  • Re: Home laptops on a corporate network
    ... Home laptops on a corporate network ... Whenever you have an employee with a laptop, you create a liability to your network, allowing them to use personal laptops presents an even bigger liability. ...
    (Security-Basics)
  • Sending Excel Workbooks to Outlook people automatically
    ... I run an Excel macro with vba statement that send different workbooks to ... different people via Outlook Exchange server in my company: ... A program is trying to send an e-mail message on your behalf.... ...
    (microsoft.public.excel.programming)