DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Dennes Torres Guest

    How can I know the domain name in wich user has loged ?



    Hi!

    Using API I can discover the machine name and the user name, but How can
    I discover the domain name ?

    I'm creating a security system. In this system the administrator can, with
    my application, configure wich nt/2000 users will have access to the application.
    So the application will not have a login screen, it will grant the access
    (or not) depending of the user logged in.

    But I will have problems if the application run in a computer outside the
    domain, so a hacker could create user accounts with the same name of users
    that have full access and the security will not work.

    So, I have two options to solve this problem :

    A) Compare domain names
    B) Compare users SID's

    How can I do that ?

    Obs: Sory by my english, I don't speak english well


    []'s

    Dennes Torres




  2. #2
    Karl E. Peterson Guest

    Re: How can I know the domain name in wich user has loged ?

    See the NetDomain.zip sample on http://www.mvps.org/vb
    --
    [Microsoft Basic: 1976-2001, RIP]



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links