Long process in asp.net c #

I have a web application that has a long (resource-intensive) process in the code behind, and the final output is a pdf file (a tool to convert images to pdf)

It works fine ... and since I'm on a dedicated server, this is no longer a problem with resources right now.

However, I am interested in the fact that the system will reach its resource limits if more than 20 users are processed simultaneously.

I saw services on the Internet where the user enters their email, and the processes, I suppose, are queued in the background and the results sent by email using the 1st through 1st method.

Can someone please let me know how to implement this logic in asp.net applications using C #?

+3
source share
3 answers

Such a system would consist of a Windows service running on a server. The only thing the asp.net page does is send the request (with the appropriate data) to the database. The Windows service then monitors this table and processes all new requests.

+5
source

You want to limit the number of simultaneous requests. You can create a separate application to handle the conversion process. Either a Windows service or a scheduled task that runs at regular intervals.

  • , MSMQ. , - . , , - , . , , - .
  • .
  • , - PDF- .

, , , , / -, .

0

, windows
:
(i)
(ii) , applicationId.

enum ApplicationId:byte
{
  Router = 1,
  Task1 =  2,
  Task2 =  3,
  Task3 =  4,
  Task4 =  5,
  Email = 6
}

(iii) . .
(iv) transactionId, nextAppId
(v) nextAppId
(vi) Windows ()
(vii) " " pdf

, !!!!. !

0

Source: https://habr.com/ru/post/1745109/