title: Process.Startinfo to print PDF not working in Windows Server 2003 from ASP.NET
body: <p>I have the below code in ASP.NET C# and it work fine in local system + production machine when i tested in debug mode. but it doesn't work when i uploading to IIS.</p>
  
  <pre><code>ProcessStartInfo startInfo = new ProcessStartInfo();
                  startInfo.FileName = Server.MapPath(filePath);
                  startInfo.Verb = "print";
                  startInfo.Arguments = "Printer Name";
                  Process proc = new Process();
                  proc.StartInfo = startInfo;
                  proc.Start();
  
                  proc.WaitForExit(5000);
                  if (proc.HasExited == false)
                  {
                      proc.Kill();
                  }
  </code></pre>
  
  <p>Things i tried.</p>
  
  <ol>
  <li>Control panel > Admin Services > Services > IIS Admin Service > Log on Tab > check to interact with desktop. Reset IIS Admin and IIS.</li>
  <li>Printer Properties > Security > Grand ASPNET, NETWORK SERVICE, EVERYONE to full access.</li>
  <li>Tried to set another printer as Default Printer. Reinstall / Add Printer.</li>
  </ol>
  
  <p>I tried all the above with no success. finally i tried below in my machine.config.</p>
  
  <ol>
  <li>WINNT>Microsoft.NET>Framework>v2.52something>Config> machine.config</li>
  </ol>
  
  <p>I replaced this </p>
  
  <blockquote>
    <p>processModel autoConfig="true"</p>
  </blockquote>
  
  <p>with this</p>
  
  <blockquote>
    <p>processModel userName="SYSTEM" password="AutoGenerate"</p>
  </blockquote>
  
  <p>and i am getting this message </p>
  
  <blockquote>
    <p>"Before you can perform print-related tasks you need to install a
    printer"</p>
  </blockquote>
  
  <p>i am using acrobat 7 and i can print the test page from printer itself and from acrobat software.</p>