NetBIOS Domain Name

  • Thread starter Michael Tissington
  • Start date
S

Steven Cheng[MSFT]

Hi Michael,

Based on my research, there is one kb article discussing how to get NetBios
and DNS Name via C#

#HOW TO: Obtain the NetBIOS and DNS Computer Names by Using Visual C#
http://support.microsoft.com/?id=303902

You may have a look. Since the dotnet buildin support for such functions is
limited. If you're wondering further power function, I think you may
consider using WMI or ADSI, thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
M

Michael Tissington

Hello,

This is not really what I'm looking for.

I'm looking to get the NetBIOS domain name of the CLIENT machine.
 
S

Steven Cheng[MSFT]

Hi Michael,

Yes, the kb article I provided in my last reply is focus on get the DNS
name of the Server Machine. However, I think the System.Net.Dns class is
still useful to us. I've find it has a static method
"GetHostByAddress" which can return the DNS info of a computer via its IP
Address.

#Dns.GetHostByAddress Method (String)
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemNetDnsClassGet
HostByAddressTopic2.asp?frame=true

And in ASP.NET we can get the client machine's ip address via
Request.UserHostAddress. So I think we can combine the two ones together as
below:

Response.Write("<br>" +
System.Net.Dns.GetHostByAddress(Request.UserHostAddress).HostName);

It'll return the full DNS hostname of the machien, include the full domain
name and the machine's alias. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
S

Steven Cheng[MSFT]

Hi Michael,

Have you had a chance to check out the suggestions in my last reply or have
you got any further ideas on this issue? If you have anything unclear or if
there're anything else we can help, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top