473,406 Members | 2,633 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,406 software developers and data experts.

Connected to network or peer-to-peer?

Hello,

is there a simple way to detect whether the host machine of my c#
application is connected to a windows network or whether it is connected
peer-to-peer simply to one other machine (IP-adress unknown)?

My first try would be to find typical UDP broadcasts within a certain period
of time. If there are no such broadcast packages then I could assume that it
is a peer-to-peer connection otherwise it is a windows network.

But I guess this is not reliable, isn't it?

Any tipps or suggestions?

Thanks!
Jan 16 '06 #1
2 1451
I wouldn't think that you would need to get that complicated about it. I
would just query network properties to see if I am part of a workgroup or
part of a domain. This way, I wouldn't have to worry about protocols
(TCP/IP, IPX/SPX, etc)

I would most likely use wmi to query this.
"Michael Bauer" <Ba********@hotmail.com> wrote in message
news:%2*****************@TK2MSFTNGP09.phx.gbl...
Hello,

is there a simple way to detect whether the host machine of my c#
application is connected to a windows network or whether it is connected
peer-to-peer simply to one other machine (IP-adress unknown)?

My first try would be to find typical UDP broadcasts within a certain
period of time. If there are no such broadcast packages then I could
assume that it is a peer-to-peer connection otherwise it is a windows
network.

But I guess this is not reliable, isn't it?

Any tipps or suggestions?

Thanks!

Jan 16 '06 #2
http://gethelp.devx.com/techtips/nt_...inNT1101-2.asp

"AMDRIT" <am****@hotmail.com> wrote in message
news:eX**************@TK2MSFTNGP15.phx.gbl...
I wouldn't think that you would need to get that complicated about it. I
would just query network properties to see if I am part of a workgroup or
part of a domain. This way, I wouldn't have to worry about protocols
(TCP/IP, IPX/SPX, etc)

I would most likely use wmi to query this.
"Michael Bauer" <Ba********@hotmail.com> wrote in message
news:%2*****************@TK2MSFTNGP09.phx.gbl...
Hello,

is there a simple way to detect whether the host machine of my c#
application is connected to a windows network or whether it is connected
peer-to-peer simply to one other machine (IP-adress unknown)?

My first try would be to find typical UDP broadcasts within a certain
period of time. If there are no such broadcast packages then I could
assume that it is a peer-to-peer connection otherwise it is a windows
network.

But I guess this is not reliable, isn't it?

Any tipps or suggestions?

Thanks!


Jan 16 '06 #3

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

Similar topics

3
by: hilz | last post by:
Hi all: I have an oracle 9i server running behind a firewall. i set up the machine that has the oracle server as a DMZ zone. i can connect to the oracle server from the local network but not...
0
by: Baihao Yuan | last post by:
Hello, I have a machine, which has two network cards, network card 1 and network card 2, they are on different subnetworks. The IP address of network card 1 is 192.0.0.1, the IP address of...
2
by: stanley j Mroczek | last post by:
Every thing is on one machine, Programs and sql. Sql is up and running(can test with query analyzer). No changes where made! This was working fine. How do you track this error? What network...
6
by: moonriver | last post by:
I write a program accessing files in network drive o:. It is doable as a standalone application. However, if it is running under windows service, the following exception will appear: 13/07/2004...
1
by: PeterNZ | last post by:
Hi all, I developped an C# app which is using FileSystemWatcher. If a file is created in a specific folder, it opens the file and does some processing. This functionality works without...
9
by: mikharakiri_nospaum | last post by:
I have graph x y - - 1 2 2 3 3 1 4 5 and would like to query how many connected components it has (two in the example -- {1,2,3} and {4,5}). Is it doable with "recursive with"?
5
by: Corrine | last post by:
Given a backend on a network server and a frontend on a local computer, when is data pulled across the network? For example, does Rst.Recordcount pull data across the network? How about...
3
by: u473 | last post by:
.... Or, How do you identify connected users ? Help appreciated. Celeste Edwards,
1
by: Daniel Xiao | last post by:
I write a program accessing files in network drive o:. It is doable as a standalone application. However, if it is running under windows service, the following exception will appear: 13/07/2004...
1
by: Kristijan Marin | last post by:
Hi, I have a project where components/programs run on different mashines ... and data exchange and execution of some actions on server side is done with help of webservice .... Now the same...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
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...
0
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...

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.