I want to create a chat application in which there is a ComboBx. I want to fill it with all the computer names in a network. How can I accomplish this in C#?
The best option for discovering other computers in a LAN running the same application is probably mDNS.
Have a look at the Bonjour SDK for Windows which comes with a COM library usable from C# and sample code.
Related
I have a web app. now I want to add "present and absent by finger print" to this. everything work fine in localhost (add finger,remove finger and etc). I send device port name to functions to do jobs.
but after publishing project I recognized that it can not find port in client's pc.
now I want to now how can I access specific port in client's pc after publishing web app?
PS:if you need to know part of code just say it to show you, thank you
Browsers don't let you to do it on purpose. However, you can create ActiveX objects, plugins or browser extensions to do it.
For example you can check this
I have understand the best way is windows application, so I did my job by creating c# windows application and did my job as well as I wanted.
i am making a Universal windows Application for home automation, the app UI and hardware interfacing is ready and working
i'm using raspberry pi 2 to serve as gpio
and i plan to use the same app on my windows phone to trigger the ON/OFF request over same local network
the GPIO Hardware interfacing is done and is working
i'm stuck at a point "How do i communicate between my phone app and raspberry pi?"
they are connected to same wifi network
i am a C#/.Net person, and any solution available over internet is for Python/Java.
There are several solutions for your question but none will involve only C# on the raspberry side. What I did (is one of the solutions available but you can choose to use pyton, for example) was to use Node.JS and run a server on a raspberry pi and connect to that server (it could be any type of server TCP server, telnet, web, etc.) and connect from C# to that server and then interact with your GPIO normally. There are libraries in Node.JS (https://www.npmjs.com/package/pi-gpio) to control GPIO so you can write code to handle a connection from your C# app and when connected turn on/off a certain GPIO.
Something like the following will create a TCP server on the raspberry pi and from your C# program you will need to connect to that IP (raspberry IP) and port (1337) and do whatever you want to do.
It is worth the time it will take learn Node.JS (it won't be complicated if you already know C# but it will take time to get used to the syntaxis but you can do so much after you know how it works).
var net = require('net');
var server = net.createServer(function(socket) {
socket.write('Echo server\r\n');
socket.pipe(socket);
});
server.listen(1337, '127.0.0.1');
NodeJs is probably a good portable choice.
But if you want to do it from Windows in C#, ASP.NET, check out the Nusbio device.
You can control gpios from a web site. See the Console demo which use the Nancy web server.
I am planning for my Capstone for my degree.
In this project I will be utilizing an ARM board loaded with a specific linux distribution. (Currently either Debian or Ubuntu based.)
This ARM board will be sitting on a network using either WiFi or wired LAN or combinations of both or multiple WiFi connections.
I will be using a PC likely running Windows to access this ARM board. Due to the nature of the intention of this setup I will NOT be using the LAN connection to control the ARM board but will be using a USB connection from the PC to the board.
I have seen some applications on an Android tablet where they install a Ubuntu host and run it on the android box in the background. They can then access this via VNC, telnet or ssh. They then have built native applications for the Android that communicate with the Ubuntu host and remotely run software on the Ubuntu host and use the data returned. Basically they are building a GUI that remotely runs the commands and displays the results in some form.
I want to build a system for my capstone that uses 1 or more ARM boards to do menial work while the PC listens to them and returns status as it becomes available.
I have seen mention of using socket programming and the Expect package written in tcl. Are these the best technologies I can use or is there something better for me to look at? Currently I am doing a bunch of work in both C# and Java but the end result program I will be building is likely to be in C# so I am looking for information to head me in the right direction. I am 3-5 years away from my degree so I am not against making a new library in C or C# to do the work for me. So porting Expect COULD be an option. I ultimately need something that works very quickly due to the nature of my intended application and I need isolation of the PC from the LAN so I will NOT be using the LAN for the control connection.
Thanks for any help or guidance!
Rodney
I`m asking this question again as I got no answer for about a week now ...
I want to know how to write a C# desktop application that can connect to the mobile version of the same application (that I will create). The desktop application will be used as a backup/restore for the mobile application.
I want to know also how to write the mobile version (using C# if possible).
May i know, in what way you want to communicate with the mobile version of the application? Ideally the cross domain/application communication is possible using services(WCF/Webservices).
I hope the following link may be useful for you : Bluetooth in C#, Which stack, Which SDK?
I am creating an application that is connecting to another computer through an Ethernet cable in XP. I need to execute the network setup wizard to setup a local area connection (with File sharing Turned On) and then set static ips and the default gateway; all this programmatically using C#. How can this be achieved?
You should be able to do this with INetCfg as described here. It's a Win32 API so you'd have to use PInvoke, as discussed here, and you should be able to find samples for calling it from C# by a search for INetCfg and C# or similar.