SqlBulkCopy multiple tables in ASP.NET MVC unblockable

asp.net-mvc multithreading sqlbulkcopy

Question

I have to make a multiple copy of tables from one database to other with SqlBulkcopy from an ASP.NET MVC application.

The process takes more than 2 minutes, and I do not trust users.

Wich is the best way to do the entire process, even if the user closes the window?

Thanks all!!

Accepted Answer

Don't do such processes in an ASP.NET application. Read this article to understand why. So do this task in a separate process than your application: a Windows service, a scheduled console application, ...




Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why