Forum Discussion
Jerry8989-
Nov 18, 2026Copper Contributor
Visual Studio Windows Service to fix ASP.Net website very long process time timing out
Hello, I have a classic ASP.NET website that allows users to put data variables into a cart and then a new data file with all the data linking is created. Once the user selects all their data and s...
davidbro8
Nov 19, 2026Brass Contributor
Your best solution is to move jobs exceeding 5,000 variables to a Windows Service, keeping shorter jobs within ASP.NET.
Recommended approach:
1. Create a reusable .NET Framework 4.8.1 Class Library containing your SAS execution and Oracle update logic.
2. Create a Windows Service that references this library.
3. Store long-running jobs in an Oracle job queue.
4. Let the service process pending jobs independently of IIS.
5. Update job status, completion time, and email notifications when processing finishes.
6. Implement error handling and recovery if the server restarts.
Important: Don't use background threads inside ASP.NET for four-hour jobs. A database-backed queue ensures jobs aren't lost during IIS recycling or application restarts.
This approach requires minimal changes to your existing SAS code and provides much better reliability.
- Jerry8989-Nov 19, 2026Copper Contributor
This is great, I already have most of the SAS execution code in a class library. I will add the rest to make it complete.
Thank you Mark for your complete breakdown of the steps I should take.