TuesPechkin icon indicating copy to clipboard operation
TuesPechkin copied to clipboard

Using default IIS code: “constructor 'ThreadSafeConverter' has 0 parameter(s) but is invoked with 1 argument(s)”

Open Eclipse-Computing opened this issue 6 years ago • 0 comments

Exactly what it says on the Tin. Used the IIS code, got that error.

Current project: DotNet 4.7, MVC 5, C# 7, installed and trying to target AnyCPU.

Have this at the very top of the page, right after the class/controller statement:

private static IConverter converter =
      new ThreadSafeConverter(
        new RemotingToolset<PdfToolset>(
          new WinAnyCPUEmbeddedDeployment(
            new TempFolderDeployment())));

And what is being highlighted is everything after the TreadSafeConverter( statement.

Edit: It seems to “work” despite VS2017 throwing a massive hairy canary with its intellisense, but I had to disable Glimpse async support in order for the page to not throw a massive error when working locally.

Edit 2: It also seems that I have been forced to forcibly unload RemotingToolset in order for more than one PDF to get generated (subsequent ones hang because RemotingToolset never gets unloaded). Not sure how this affects stability (I have already experienced IIS crashing once on the testing server because of PDF generation), but this also forces me to bring the IConverter content down from its static implementation at the top of the page and clear into the method used to create the PDF in the first place. Not sure how to ensure/force RemotingToolset to unload from where it was before.

Eclipse-Computing avatar Apr 23 '18 18:04 Eclipse-Computing