Wrox Programmer Forums
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 15th, 2007, 10:15 AM
Authorized User
 
Join Date: Dec 2006
Posts: 70
Thanks: 0
Thanked 1 Time in 1 Post
Default connected to domain?

Is there an attribute of my.computer that will tell you whether or not the user is connected to a domain?
The closest I've come to this point is my.computer.name, because it contains the domain as part of the name.

Is there another way?

Thanks,
Karen

 
Old May 15th, 2007, 10:28 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

This will tell you if the user is connected to the domain although it works the same way:

System.Security.Principal.WindowsIdentity.GetCurre nt().Name.ToString()

Returns: [domain]\username

obviously if they are not connected to the domain, the computer name will take the place of [domain]

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Same pages for sub domain from main domain vivek_inos ASP.NET 1.0 and 1.1 Professional 1 February 13th, 2007 10:15 AM
how are the classes connected FT BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 November 21st, 2006 08:45 PM
SQL Server can't get connected liweiguo BOOK: ASP.NET Website Programming Problem-Design-Solution 1 October 6th, 2006 10:08 AM
Oracle Not connected. dpkbahuguna Beginning VB 6 4 August 17th, 2006 10:52 PM
http://domain or http://www.domain anshul HTML Code Clinic 9 August 11th, 2004 01:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.