In a asp.net web application we need to develop a page with following functionality:
- Read a text file containing around 1,00,000 coupon number.
- Create PDF for each coupon number and save it in a file server and also update database.
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:
- Showing status of how may coupon has been generated and how much left.
Thanks,
paul
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.