0

I am building a webservice to generate thumbnails for PDF files using the Windows API Code Pack, using the ShellObject.FromParsingName(filepath) and then accessing the Thumbnails property.

This works fine as long as it is hosted in a console application, but as soon as I host in a Windows Service or in IIS, it doesn't work anymore because in those contexts there is no Windows Shell.

Can I force the windows shell to be loaded in such a context? How can I solve this problem?

Tudor Olariu
  • 1,318
  • 1
  • 11
  • 18

1 Answers1

0

One option would be to host it in a console application and then spawn a new process for your console app from your web service. Not ideal, but I have had to do it before (for different reasons) and it works OK.

row1
  • 5,568
  • 3
  • 46
  • 72