Automatic reading routine between 2 databases in C #

4

I need to create a C # routine that reads 2 databases and feeds the read data to another database. The development part of the system itself I can do without problems, but I do not know what kind of project to develop. This routine will run weekly and it should be published / allocated on a server.

My question is: "What is the correct way to develop such a routine? It would be the creation of an executable that would be triggered by

    
asked by anonymous 19.02.2014 / 14:03

1 answer

5

The answer depends on the type of hosting your application might have.

If you're hosting somewhere that gives you shared web hosting, you're limited to ASP.NET. In this case, I would make a web application with a calling point (ie: a web service ), and on the outside you would need a cron job (a service that accesses a page or web service at certain times).

If you can launch an executable or service on the server (which can be your personal machine, or a machine in the company), then these are the pros and cons for each model:

  • Application: You can use the scheduler, as you said, to call your application. The scheduler plays cron job . The main disadvantage is security ... Anyone with access and malicious can replace their executable with another malicious assembly.

  • Service: You can write the routine of the routine activation itself, and the service is cron job itself. If the service fails, it may restart automatically. It's much harder to replace your service with something malicious and the authentication / account settings it will use are much easier. The only major drawback is that it is a little bit, but only slightly, more complex than an executable application. Oh, and you need to be the administrator of the machine to put it to run, but I think in your case this should be no problem.

I personally would get the service.

    
19.02.2014 / 14:18