c# - MVC ControllerContext, Threads/Tasks, Rotativa -
rotativa 1.6.4 keeps issuing system.nullreferenceexception in rotativa.dll
specifically occurs on buildpdf(context)
i have tried thread, task , other background type jobs. why? pdf generation extremely slow @ times , buggy using actionaspdf (see here) want spin off new thread/task or background job, , log errors, can user on way asap.
the buildpdf takes current controller context, going in null i've tried making new context, using httpcontext, making new instance of controller same results. once gets rotativa.dll context compeltely gone, no matter if pass in before being thread/task, or create new 1 right before call buildpdf();
how valid controller context either before begin thread/task job, or once inside thread/task job rotativa?
at point i'm more ready spend real money on real pdf solution, far seems pita , mediocre @ best if have simplistic child needs of pdf.
did try create synchronizationcontext instead?
seems library non-thread-safe.
Comments
Post a Comment