ASP.Net MVC Long Running Process

后端 未结 2 1999
感情败类
感情败类 2021-01-25 07:49

I have a requirement to produce a report screen for different financial periods. As this is quite a large data set with a lot of rules the process could take a long time to run

2条回答
  •  被撕碎了的回忆
    2021-01-25 08:09

    In case your app is running on Windows Server with IIS your ASP.Net code can create a record in db table which will mean that report should be created.

    Then you can use Windows Service or Console App which might be running on the same server and constantly checking if there any new fields in the table. This Service would create a report and during creation it should update table field to indicate progress. Your ASP.net page might be displaying progress bar, getting progress indication from db using ajax requests or simply refreshing the page every several seconds.

    If you are running on Windows Azure cloud you might use WebWorker instead of Windows Service

    For screen locking on your page you may use jquery Block-UI library

提交回复
热议问题