Error Printing From Webservice Follow

0
Avatar
Legacy Poster

Hi,

 

I am using Bartender 9.4 SR3 build 2781

 

I have a Webservice where i start some bartender engines in the global.asax.(like in the examples)

The First Call of my print method after Application start fails with this Error Messages

 

Print Task timeout
Print Task error
Task Messages:
The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
Print Task has completed
Task Messages:
The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
Task Messages:
The remote procedure call failed. (Exception from HRESULT: 0x800706BE)

 

same issue with

 

 

taskManager.TaskQueue.QueueTask(taskPrint);

 

and

 

taskManager.TaskQueue.QueueTaskAndWait(taskPrint,6000);

 

 

seems that the printing engine crashes.,.i can see the file in the printers queue but nothing happens. i also noticed that if i kill one of the bartender tasks, the document gets printed.

 

     
                    taskManager = new TaskManager();
                    taskManager.TaskEngineStatusChanged += new EventHandler<TaskEngineStatusChangedEventArgs>(taskEngines_EngineStatusChanged);
                    taskManager.ErrorOccurred += new EventHandler<EngineErrorEventArgs>(taskEngines_ErrorOccurred);
                    taskManager.Start(engines);
                    Log.Info(engines + " Bartender Engines started.");
                    Application["TaskManager"] = taskManager;
            


                if ((taskManager != null) && (taskManager.TaskEngines.AliveCount != 0))
                {
                    LabelFormat labelFormat = new LabelFormat(bartenderBtw);
                    labelFormat.PrintSetup.PrinterName = printer;
                    labelFormat.PrintSetup.NumberOfSerializedLabels = serialPrint;


                    if (labelFormat != null)
                    {

                      
                        TextFile tf = new TextFile("Textdatei 1");
                        tf.FileName = filename;
                        labelFormat.DatabaseConnections.SetDatabaseConnection(tf);
                        PrintLabelFormatTask taskPrint = new PrintLabelFormatTask(labelFormat);
                        taskPrint.ErrorOccurred += new EventHandler<TaskEventArgs>(printTask_ErrorOccurred);
                        taskPrint.Completed += new EventHandler<TaskEventArgs>(printTask_Completed);
                        taskPrint.TimedOut += new EventHandler<TaskEventArgs>(printTask_Timeout);
                        
                        taskPrint.PrintTimeout = 10;

                       
                        taskManager.TaskQueue.QueueTaskAndWait(taskPrint,6000);

                        Log.Info("File " + filename + " added to queue.");
                        
                 
                    }
                }
                else
                {
                    string errorMsg = "Unable to print. Please make sure you have BarTender installed, activated as <br />Enterprise Print Server edition, and that print engines are running.";

                    throw new Exception(errorMsg);
                }
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }




 

1 comments

0
Avatar
Domingo Rodriguez
Moderator
Comment actions Permalink

Do you have the correct and required Edition, Enterprise Print Server? 

 

When you start BarTender manually and try to print, does it print correcty? Do you get any Seagull License Server related error message?

 

Make sure to enable text file logging (messages) in BarTender. Do this via the "Administer > Log Setup > Text File Log" dialog.

 

Furthermore, try running some of our .NET SDK examples, found under "Start > Programs > BarTender v9.4 > BarTender .NET SDKs"

Please sign in to leave a comment.