-6

I just want the way how to implement a page running in background without having restriction from navigating to other pages,For Eg: IRCTC website--if we request for pnr status the pnr status is processed at background by opening another page and we can navigate/browse to any other page in IRCTC site

Actual Scenario: In my Project i am having code for exporting to excel it generally takes 10 minutes to export to excel...so,to reduce the time i wish have a process export to excel to be running in background so that the user can be navigating other pages in my site during exporting to excel process also,for this purpose i raised the question if there was any way to solve please mention the way..Thank you..:-)

  • 1
    If you're going to reference a site like that, remember that 90% of the world don't know what IRCTC is. I googled for it and I know it has to do with India's railroads, but I'm at a loss as to what a pnr is now. – Geeky Guy Jun 04 '13 at 12:25
  • I am not saying anything about IRCTC i just mentioned it an example – krishnakishore Jun 04 '13 at 12:29
  • 1
    simple. it is just a popup. use the javascript's 'window.open' input url with all necessary querystring. it will become separate request.. – Bharath Jun 04 '13 at 12:30
  • In my Project i am having code for exporting to excel it generally takes 10 minutes to export to excel...so,to reduce the time i wish have a process export to excel to be running in background so that the user can be navigating other pages in my site during exporting to excel process also,for this purpose i raised the question if there was any way to solve please mention the way..Thank you..:-) – krishnakishore Jun 04 '13 at 12:33
  • In that case, this is a duplicate of [Long-running background process in ASP.NET - Application_Start or separate process?](http://stackoverflow.com/questions/8401886/long-running-background-process-in-asp-net-application-start-or-separate-proce). – CodeCaster Jun 04 '13 at 12:35
  • I wish not to use Background worker in my asp site..Is there any possible of using Asynchronous Way.. – krishnakishore Jun 04 '13 at 12:43
  • Read the link. It's not about a background worker, it's about a separate service which you call to generate the Excel. You don't want to do that in an IIS worker process. – CodeCaster Jun 04 '13 at 13:15

1 Answers1

3

HTTP is stateless, so what you are doing in one browser window should not influence what is happening in another window on the same machine.

Hoewever if you rely on serverside state, such as sessions, and not on HTTP POST or GET data, yes, you run into trouble when someone opens your site in two tabs, because the same data will be displayed in both tabs. At least, that's what I guess your problem is according to your question.

To solve that, remove the session logic and rely on data supplied with each request, such as POST and GET.

If you have a totally different problem, please try to explain again what you mean with "implement a page running in background without having restriction from navigating to other pages".

CodeCaster
  • 147,647
  • 23
  • 218
  • 272
  • In my Project i am having code for exporting to excel it generally takes 10 minutes to export to excel...so,to reduce the time i wish have a process export to excel to be running in background so that the user can be navigating other pages in my site during exporting to excel process also,for this purpose i raised the question if there was any way to solve please mention the way..Thank you..:-) – krishnakishore Jun 04 '13 at 12:33