Seagull.bartender.print.printengineexception: The Bartender Engine Could Not Be Started Follow

Legacy Poster



Bartender 2016 & SDK installed as trial version (Enterprise Automation) on Windows 2008 R2 SP1 web server (64bit).

I can print from Bartender label designer just fine.


Trying out the new 2016 SDK and getting this error:


Seagull.BarTender.Print.PrintEngineException: The BarTender engine could not be started. Possible reasons are: 1) BarTender is not properly installed. 2) BarTender is not properly registered on the computer (e.g bartend.exe /register). 3) There are too many process instances of BarTender running. Stop a few bartend.exe instances and try again. Also see SDK Engine.Start method documentation for information about how to allow more BarTender processes to run on your computer by increasing your "non-interactive" shared desktop heap. 4) The user account does not have permission to run BarTender. ---> System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {B9425246-4131-11D2-BE48-004005A04EDF} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). at Seagull.BarTender.Print.Engine.Start(EngineSettings engineSettings, LicenseKeyManaged license, IntPtr interactiveUserHandle) --- End of inner exception stack trace --- at Seagull.BarTender.Print.Engine.Start(EngineSettings engineSettings, LicenseKeyManaged license, IntPtr interactiveUserHandle) at Seagull.BarTender.Print.Engine.Start() at Print.Button1_Click(Object sender, EventArgs e) in C:\inetpub\STbrutnell\Print2.aspx.vb:line 35


I have been tinkering around trying to print to a network printer (Zebra ZD500) with a static IP address assigned to it from a simple ASP.NET VB.NET web form page.  The fundamental idea being that anyone within the LAN can open the page in a browser and click a PRINT button and it print a predefined BTW label to the network printer.  We have been using commander but want to get away from that approach as it relies on the client app to operate based on triggers.  Can this been done using the new SDK?  I have read all the white papers and the SDK documentation but don't see anything relating to this set up.


CODE (VS2013 4.0)


Imports Seagull.BarTender.Print
Partial Class Print
    Inherits System.Web.UI.Page

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

     Using btEngine As New Engine() 
                Dim btFormat As Seagull.BarTender.Print.LabelFormatDocument = btEngine.Documents.Open("LabelFiles\2016\IP_TEST.btw")
      End Using
End Sub
End Class




Ian Cummings
Comment actions Permalink

Make sure the BarTender class is correctly registered in BT2016.  Open up a command prompt, navigate to where BarTender is installed, and then run the below command line:


bartend.exe /register


There might also be permissions issue with BT2016 caused by a corrupt install (and a bug) contact tech-support if you continue to have problems as they are best placed to help you.


Note that in the BT2016 SDK there is a sample web printing application that you can use/fork for your own needs.  Sorry, but there is no documentation on this beyond comments in the code on the R1 release.  Or indeed the predefined Print Portal web application is something that might be of interest to you.  The use of the new Integration Platform, which replaces Commander, is also an option as it can print using web service message events coming from your web app, be they GET requests with params or POST with JSON payload.  The latter option, although still using an event based mechanism should be a lot easier and quicker to implement.

Legacy Poster
Comment actions Permalink

Turned out to be a permission issue on the webserver regarding the appPool.  Thanks,

Please sign in to leave a comment.