473,386 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Retrieve Domain Name

Hello Friends

I have a big problem. I can't retrieve the domain name (example:
contoso.com) using visual basic.net language. I'm very appreciate if anyone
give me an example how can I solve this.
Im new on this language and and perhaps this is very easy for all of you :)

Thanks for help

Bruno R.
Nov 21 '05 #1
3 1827
"Bruno" <Br***@discussions.microsoft.com> schrieb:
I have a big problem. I can't retrieve the domain name (example:
contoso.com) using visual basic.net language.


Can you describe the scenario in more detail? What do you mean with
"retrieving a domain name"?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2
Hello

I need to create a simple application that returns the domain name where the
user name logs in. For example, if I acccess in a computer with the domain
user Contoso\bruno, my application should return the value "CONTOSO".
Basically, my application when executed in a pc that belongs to a domain,
must return the CONTOSO.COM (domain name). All this in Visual Basic.net.

Thank you for help

"Herfried K. Wagner [MVP]" wrote:
"Bruno" <Br***@discussions.microsoft.com> schrieb:
I have a big problem. I can't retrieve the domain name (example:
contoso.com) using visual basic.net language.


Can you describe the scenario in more detail? What do you mean with
"retrieving a domain name"?

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
On Tue, 26 Apr 2005 11:27:02 -0700, "Bruno" <Br***@discussions.microsoft.com> wrote:

¤ Hello Friends
¤
¤ I have a big problem. I can't retrieve the domain name (example:
¤ contoso.com) using visual basic.net language. I'm very appreciate if anyone
¤ give me an example how can I solve this.
¤ Im new on this language and and perhaps this is very easy for all of you :)

Try the following:

Dim SystemInfo As Object

SystemInfo = CreateObject("ADSystemInfo")
MsgBox(SystemInfo.ForestDNSName)
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Paul Smith | last post by:
This doesn't seem like it should be *that* difficult, but after quite some time trying to figure it out, I'm still banging my head against the wall. My objective is to examine the exact...
2
by: Dan | last post by:
All, I need to be able to retrieve a list of Domains that are part of our network: similar to the list you get when you log onto a Windows station that is part of a domain. I assume that I can...
5
by: tjonsek | last post by:
I am trying to pull the user logon info in an application to use as a security stamp when someone completes a function. So far, I am able to retrieve the computer name. This is, however, not what...
5
by: tjonsek | last post by:
am trying to pull the user logon info in an application to use as a security stamp when someone completes a function. So far, I am able to retrieve the computer name. This is, however, not what I'm...
5
by: tjonsek | last post by:
I am trying to pull the user logon info in an asp.net application to use as a security stamp when someone completes a function. So far, I am able to retrieve the computer name. This is, however,...
1
by: Lyners | last post by:
What I need - To retrieve the server name that the ASP application is running on. Why - Our current intranet is on a network where we have users that are on a domain and some that are not. Using...
1
by: Andy Wu | last post by:
Hi All, I've been working on a domain parking project where we need to analyze a domain name, say "bookhotel", and get keywords(book, hotel) out of it, then use these keywords to do some search....
1
maxamis4
by: maxamis4 | last post by:
Hello folks, Here is the backgroup. I am creating an agent that can find a user in LDAP and return the last logon date. Now i am not sure if with active directory you can user the...
0
by: Salim Fadhley | last post by:
I'm looking for a method to retrieve a Windows Domain name (not a DNS Domain name). I know this can be done by simply reading an environment variable, however on the machines I need to work with...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.