I've got issues with this task.
I have a client-server application for synchronizing files in certain folders. The local client runs on Windows 7 and server is on Windows server and I need a local desktop application that would check the file changes on the server and to notify these changes. I've played a bit with the FileSystemWatcher class, but it seems to work only on mapped drives or local machines either. It has to be somehing like http://server.com/watched_directory.
Is there another way, how to reach the point?
You're right. FileSystemWatcher just works on local or mapped folders and do not work over http protocol.
Anyways, you can to write an application which uses FileSystemWatcher and run it on your server with a WCF interface to your client on Windows 7 machine can interact with data collected by first application. So, it will be more like a client/server application, but seems to fit your scenario.
Related
My setup requires a web app to start a desktop app. There is a method for doing this mentioned here:
https://weblogs.asp.net/morteza/How-to-run-a-desktop-application-from-a-web-page
However, I would prefer not to make a registry change. Also, I have a file-system connection to the web server, so the server can write a file to my remote profile.
The question is, what is the best way for a desktop 'listener' program to detect that a file has arrived? (so that in this case it can run a script for a larger desktop program).
By 'best' I mean low impact, so preferably not checking the remote directory every half-second. The environment is Citrix Windows, (code used is C#).
Thanks for reading.
We have a local network and a program running on each machine which communicates with a database.
I wanted to display notifications (like BalloonTip) across the network to every computer whenever something is changed in the database.
Because everyone is using the same operating system (Windows 10) I could use built in notification controls.
I wanted to do this programmatically in C#.
Do you guys have any ideas how to send a message from one computer to every single one in the network?
As shown in the above image. I have a server and few clients connected in on a LAN. Clients contain a folder which contains files/images. I want to synchronize all the files from client to single folder at server.
I searched for a solution the web, but no clear ideas on how to implement. I am not familiar with how synchronization works and I don't have idea what is BITS and how it works.
Is there any way to use a Windows Forms Application and Wcf/C# to do this?
I have an application that creates a HTTP server on a random port (50000-59000) on "localhost". It tries to connect to this port afterwards to determine if everything was setup correctly and is ready to use.
This seems to work on most machines very well. Its written in C#.NET 4.0 for Windows XP and higher.
Now I have the problem that on one server at one customer the creation of the server seems to work but it can't connect to it. Sadly we didn't any information as the exception details were not outputted from this software as it has happened.
It works if the file is on local disk. If they start it from a specific Windows network share it stops working. I think that the have a special setting which causes this issue. But I don't know that could be reason.
My Question:
Do you know settings, an system administrator could make, that prevents a software, running as normal user, to connect to a listening port, that the program has opened just a moment ago? May be group policy settings in the active directory?
I've written a test program to try this again at our customer.
I am writing a Windows application using C#. I am planning on later to allow it to be controlled over the intranet using browser also. So in future we should be able to control it both using the local interface or over the intranet from the browser.
Is there any pre-defined architecture which will allow me to do this? What are the methods of achieving this? I am new to C#/.Net.
EDIT:
The windows application needs to access the communication ports extensively, and needs to be pretty stable and would probably run for some days together.
Thanks...
I can't tell you if a specific package exists that would ease the development. But, if I were to attempt it, after Googling and not finding something already available and meeting my needs, I would likely make my application a WCF host. Create service entry points to accept control messages remotely. You would also need some well-know location where to register your application so the remote system could find it. You should be sure to provide the user with a way of disabling the application remote control feature.
Your host interface will need to run on its own thread to remain performant. Since you are new to C#, and presumably windows forms application development, you will need to read up on how to properly talk to the GUI controls from a non-GUI thread.
Alternatively, you may want to implement your application as two distinct units, one with a GUI that does all the user interaction. It would form service requests to send to the host portion (with no GUI). Your app could then operate locally or be controlled remotely.
One solution I have used in a similar situation has three parts :-
1) Win32 (local) Service
Manages the COM ports and does whatever is necessary with the attached hardware
2) WinForms/Console Application
Runs on the local machine and communicates with the local service via named pipes or TCP.
3) Web Server + Web App
Runs on local or remote machine & communicates with local service.
The local user can shut the WinForms application down and log-off without affecting the service or remote users.
The newest version of Silverlight (the version that ships with Visual Studio 2010) allows what Microsoft terms the "Out Of Browser Experience" (OOB for short).
This allows the user to set up the Silverlight application as a desktop application as well as running through a browser.
Rudi Grobbler has just blogged about how he went about setting this up on his PC.