Reputation: 467
In a asp.net web application we need to develop a page with following functionality:
Its a time consuming process. If we do it in main thread it may occurs times out error. Please guide me best approach to do this considering following points:
Thanks, paul
Upvotes: 1
Views: 79
Reputation: 6890
It would probably be best if you separate your time consuming tasks in a separate service(WCF service for example). You can create a method that will process your 10,000,000 coupons and generate PDFs and you can have another to check the status of the processing while just displaying a processing icon in your web page.
There are also other alternatives as asynchronous pages in asp.net.
Upvotes: 0
Reputation: 100607
If you must do this in your ASP.NET application, consider:
If you'd want to move this out of your web app, you could submit a 'job' to another application like a web service or a Windows service. Simply give it the array of coupon numbers, or a file to pickup and parse.
For each coupon completed, it could drop that 'finished' flag into a database or a file to a directory, and your web application could read that for feedback to your user.
Upvotes: 1