Monday 15 April 2013

asp.net mvc - Asynchronous generation of PDF - error handling -


We have some code that uses a third-party component to generate a PDF from a URL (url page our Within the application). In code, we instantiate the PDF generator and it creates PDF in an asynchronous fashion.

The problem I have is that if we pass the URL then there is a problem, there is no sign of it, the PDF generator, we have been created a PDF which has a 404 error page, or our custom problem page.

I need something within my controller, first call this URL (which is another view) and check that the PDF generation does not make this error before calling. Can anyone tell me about this, how can I do this?

If you receive 404 or 500 (etc) for an HttpRequest URL first, then Check that you have a problem.


No comments:

Post a Comment