Thank you Bruce!
I am not sure how to setup profile for asp.net...
Also, I specified printer on another part of the code as below:
ProcessStartInf o startInfo = new ProcessStartInf o();
startInfo.UseSh ellExecute = true;
startInfo.Verb = "Printto";
startInfo.Argum ents = @"\\UTzhangM\Ze braTLP";
startInfo.Creat eNoWindow = true;
startInfo.Windo wStyle = ProcessWindowSt yle.Minimized;
startInfo.FileN ame = @"E:\\barcode\t est.pdf";
Process p = new Process();
p.StartInfo = startInfo;
p.Start();
"bruce barker" wrote:
on the server there is no profile setup for asp.net (on you dev box it runs
as you). this means no default printer. you will need to specify the printer.
-- bruce (sqlwork.com)
"Michelle Mabelle" wrote:
I have the code below. It will open and print the pdf file (test.pdf) to the
printer.
ProcessStartInf o startInfo = new ProcessStartInf o();
startInfo.UseSh ellExecute = true;
startInfo.Verb = "Print";
startInfo.Creat eNoWindow = true;
startInfo.Windo wStyle = ProcessWindowSt yle.Minimized;
startInfo.FileN ame = @"E:\\barcode\t est.pdf";
Process p = new Process();
p.StartInfo = startInfo;
p.Start();
It works well on my local test machine. Once I copied it to the server, it
will not print or open the pdf file.
Anybody can help?