title: Excel hangs when printing the first time from ASP.NET webservice
body: <p>We are using Excel to convert SpreatSheetML to XLS in an ASP.NET webservice. Moreover, if the user checks the right checkboxes, we spawn a thread that uses Excel to print the spreadsheet. </p>
  
  <p>Recently, we have deployed the app in a new environment, and then we started having problems: the first time someone tries to print, Excel seems to hang on the server - i.e. the call to the <code>PrintOut</code> method on the workbook never returns.</p>
  
  <p>But if we log in to the server as the application pool identity and open Excel, send something to the printer, and close it again, printing will work from then on!</p>
  
  <p>I suspect that Excel is showing an <code>invisible dialog</code> - the symptoms are the same as we had earlier, a time when Excel seemed to stall on a "cannot use object linking and embedding"-dialog that appeared when Excel opened.</p>
  
  <p>I know that using server-side Office automation is bad, but this is a legacy app that is very hard to change, so please don't just advise me to re-design our solution.</p>
  
  <p>Has anyone had any experiences with this kind of behavior?</p>