How to Interact from Web Application to Client Machines

Asked

Viewed 115 times

0

I have a web application on ASP.NET MVC which is an intranet project. I would like to add some features to it to make it easier to work with Backup’s.

I already have one WIDNOWSFORMS APPLICATION that performs the backups with user interaction and saves them on a server on the network. And also the same application only in the form of WINDOWS SERVICE that automatically backups at a certain time and also saves them to a server on the network.

Each of the applications serves in a scenario, but what I want is: Integrate the Application ASP.NET MVC for when, for example, I want to backup drivers of a particular machine of a user, I select this option in the WEB Application, it sends the message (Somehow to the machine, I think it can communicate with the service) and the machine does the Backup and saved on the server.

How can I do this, through WEB API, some other way ?

  • 1

    It’s all very abstract, I guess, but it’s a guess. You may have something to stop you depending on what you do, but you can’t answer it, you don’t know what you’re going to do. In the current form it is very difficult to answer.

  • @bigown what I’m looking for is the form of web app interaction with a service. An example is an antivirus. The person in the Web console gives the command to scan and Antivirus checks. What I want to know is how this communication happens.

1 answer

0

From what I understand you want to "automate" some processes that already exist and that today require a human interaction to be realized or simply YOU, and not the user, indicate when to do.

As this should come from the web application and received by the desktop application, I believe that creating a windows service "Windows Service", in c#, in the client solve your problem.

In the web application you inform what should be done (save this in a database table) and the application "Windows Service", in the client, from time to time checks and processes this(s) information().

  • For security, create a "Web Service" to read this "table" (do not leave database connection information in the client).

  • Use a token to validate Web Service access

  • Put a time interval that meets your needs, that does not cause unnecessary connections in the database and processing overload in the customer’s machine.

  • Bring at once a list of the "actions" to be performed on the client, thus avoiding multiple access to the database.

Tip to run the application in a time interval:

do
{
    ProcessaAcoes();
    Thread.Sleep(1000 * 60 * 60 * 2); //de 2 em 2 horas
} while (true);
  • 1

    Tip: http://answall.com/q/86014/101

  • Very good @bigown did not know, I will give a search on the subject. I marked as useful comment, thanks! :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.