title: Frequently refreshing web page during long-running process
body: <p>I've been hunting around my issue for a while, probably the best I've come up with is another Stack Overflow question: <a href="https://stackoverflow.com/questions/5553001/how-should-i-perform-a-long-running-task-in-asp-net-4">How should I perform a long-running task in ASP.NET 4?</a></p>
  
  <p>I'm in a similar place in that I'm wanting to understand what my options are, but I don't feel I know enough specifically about MVC to come to a view. I'm using MVC 5 but with the 4.8 framework, plus I note that technologies such as SignalR have become available since this question was asked. I was wondering if any experienced MVC'ers could give me a view?</p>
  
  <p>I too have a long running process. More specifically, the user is importing a file. The file is delimited so the import happens line by line. The file might be thousands of lines long. Each line will be parsed and imported in a fraction of a second but the whole operation might take several minutes.</p>
  
  <p>I don't particularly need behaviour to be asynchronous, but because of the length of the entire process I want to regularly update the user on progress. I'm wondering what options I have?</p>
  
  <p>I've got a vague recollection that I might have looked at this problem 20-odd years ago (Classic ASP), and solved it by regular flushes, sending a bit more of the page to the client every few seconds, but I'm trying also to use a _Layout page now, so I've sent the page back already. So I don't think I have that option, even assuming such a mechanism still exists. A bit more recently, but still a while ago, I might have used javascript to poll but everything I'm reading now seems to point me to newer technologies which I'm not sure I fully understand yet.</p>
  
  <p>I'm just wondering how would <em>you</em> solve this problem?</p>