473,795 Members | 2,882 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to get workgroup name in c#

AnuSumesh
96 New Member
Hi All,

I want code for :

whether server is in workgroup or in domain and then i want to get the workgroup/domian name of server.

I am using c#. I know the code for getting domain name but how to get workgroupname?

Can anyone help me plz?

Thanks
Anu
Feb 26 '08 #1
0 1428

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1888
by: Trina | last post by:
Hello, Why would a member of workgroup not get a logon prompt when opening the database? Trina
7
2051
by: Paul T. Rong | last post by:
A card where I wrote my name and WID (work group ID) was stolen (unfortunately together with other things), therotically the one who have my name and WID can create the same mdw file which I use with my database. Who can tell me can it have any influnce on the security of my database? If nothing, I will just ignore it.
3
4734
by: Mark | last post by:
I have a server in a workgroup (called "wg"). Does anyone know how to find the name of the workgroup from code (pref c#)? I've trawled the newsgroups and the MSDN site for the right class / method / property to use but I just can't find the right one. There are plenty (such as UserDomainName) that give me the server name, but none that I can find to give me the actual workgroup name. TIA Mark
3
15374
by: Bryan | last post by:
We created a Windows Service with C#. The service will start OK on computers that are a member of a domain, but when we try to start it on a server that is configured for a workgroup we get the following error in the event log: Event ID: 7001 Description: The {Service Name}service depends on the Net Logon service which failed to start because of the following error: The service has returned a service-specific error code.
3
8959
by: zav | last post by:
Hi all. Getting stright to the point Im trying to get and set my computers workgroup name but im having litle luck, i've tryed: Environment.UserDomainName Environment.MachineName but they only retreive the local machine name.
11
5603
by: Mark Hollander | last post by:
How do I get the name of the Workgroup or Domain that the computer has been registered in. Thank you Mark Hollander
1
4099
by: Bilge TUTAK | last post by:
Hi, I want to find the list of the computer names in a workgroup or in a domain. Is there a way to do this in VB.NET? Thanx
2
1653
by: Richard L Rosenheim | last post by:
On my development machine, it works -- SystemInformation.UserDomainName and System.Environment.UserDomainName both returns the domain name. But, on my test machine, these methods are returning the computer name. Both systems are running Framework 1.1 w/SP 1 installed. The code was compiled using VS 2003 (VB.NET). Is the problem that the test machine belongs to a workgroup, and not a domain? If so, how to determine the workgroup name?
6
7687
by: Spyder | last post by:
When you go to "MyComputer" and get properties and select "Computer Name", you get the Domain or Workgroup a computer belongs to. I have looked thru MSDN library, the Internet, the Registry and in all files on my computer and cannot find how to retrieve this information in VB.Net 2005. This information is essential for our system implementation. I have tried: NetworkInformation.IPGlobalProperties.GetIPGlobalProperties but it does not...
4
10890
by: duffaz | last post by:
I am trying to I am trying to connect to an SQL Server using a vb.net program. It works if I put it on the SQL Server computer, but will not connect over my local network that is set up as a workgroup. I get the following message: Login failed for user 'DELL4100\Guest' DELL4100 is the computer name where the sql server is on. The connection string is: Data Source=dell4100;Database=dbname;User ID=dbn;Password=password; I have also...
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10443
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10216
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10165
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10002
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7543
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2921
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.