title: Another knack on the "Dialogs must be user-initiated" Security Exception in Silverlight printing
body: <p>I get the infamous "Dialogs must be user-initiated" Security Exception when I try to print some stuff in Silverlight. As you can see, the dialog is as user-initiated as can be:</p>
  
  <p><img src="https://i.stack.imgur.com/SOmG3.png" alt="Silverlight printing &quot;Dialogs must be user-initiated&quot; Security Exception"></p>
  
  <p><a href="http://johnpapa.net/silverlight/printing-tip-ndash-handling-user-initiated-dialogs-exceptions/" rel="nofollow noreferrer" title="John Papa: Printing Tip – Handling User Initiated Dialogs Exceptions">John Papa couldn't help me much out neither</a>, because I don't have any breakpoint set. <a href="http://msdn.microsoft.com/en-us/library/ee671023(VS.95).aspx" rel="nofollow noreferrer" title="MSDN: Silverlight Printing">Mr MSDN thinks it could also be that I'm just taking too long</a>, but this is a demo application just as simple as can be.</p>
  
  <p>Any ideas? I guess it's a Visual Studio quirk, maybe some extensions interfering, as things seems to work when I launch the application outside of it. I first thought maybe the Code Contracts are interfering with their IL weaving, but they are deactivated for this project.</p>
  
  <p>Update: This is just a simple Silverlight application that runs locally from the file system. When I do "Start debugging", Visual Studio creates a hosting HTML file containing the Silverlight app in the Debug resp. Release folder of the project, launches the Internet Explorer with that HTML file and attaches the debugger to it.</p>
  
  <p>Update 2: I also get the same error when I create a web project to host the Silverlight app and create a virtual directory for it on IIS.</p>
  
  <p>I might also want to add that I don't have problems with printing in other Silverlight projects regardless of their hosting scenarios.</p>
  
  <p>Update 3: I downloaded FireFox and it works, I don't get the error when I debug with it. So it seems to have to do with my IE8. I uploaded the solution:</p>
  
  <p><a href="http://dl.dropbox.com/u/10401470/Code/Demos/PrintingDemo.zip" rel="nofollow noreferrer">http://dl.dropbox.com/u/10401470/Code/Demos/PrintingDemo.zip</a></p>
  
  <p>I wonder if anyone can reproduce?</p>
  
  <p>Anyone got an idea to which team I should file a bug report? Silverlight team? IE team? VS Debugger team?</p>