Faulting Application Bartend.exe, Version 10.1.0.2926, Faulting Module Unknown Follow

0
Avatar
Legacy Poster

I'm getting the following error when I print from my web application using .NET SDK (c#) on IIS 6 on a Windows 2003 R2 server:

 

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.

 

 

My web app is a simple one that passes a SQL query to a BarTender label and then prints it. It runs fine on my development PC (Windows 7 Professional)

 

Code for the BarTender Print function:

        try
        {
            Engine btEngine = new Engine();
            // Start BarTender Engine
            btEngine.Start();
            // Retrieve the preferred license connection.
            LicenseConnection connection = btEngine.LicenseServer.PreferredConnection;
            // Check if the engine is connected to license server. 
            if (btEngine.LicenseServer.Connect()) eMsg = "Connected BarTender engine to a License Server";
            else eMsg = "Failed to connect BarTender engine to a License Server";
            // Open the Label
            LabelFormatDocument btFormat = btEngine.Documents.Open(BTlabelStr, BTprinter);
            // Set the variable Named Substrings
            btFormat.SubStrings["Ref1"].Value = Ref1TextBox.Text;
            btFormat.SubStrings["Ref2"].Value = Ref2TextBox.Text;
            // Open Database connection for label
            ((OLEDB)btFormat.DatabaseConnections[0]).SQLStatement = VarQueryStr;
            // Select the options for printing
            if (labelcountTextBox.Text == "") labelcountTextBox.Text = "1";
            btFormat.PrintSetup.IdenticalCopiesOfLabel = Int32.Parse(labelcountTextBox.Text.ToString().Trim());
            // Print the label format document
            Messages btMessages = null;
            Result result = btFormat.Print(BTlabelStr, out btMessages);
            // Stop the engine 
            btEngine.Stop();
            // clean up the resources
            btEngine.Dispose();
        }
        catch (Exception ex)
        {
            eMsg = ex.Message;
        }
 

 

Also, the following message appears in the Event Log (under Application):

 

Faulting application bartend.exe, version 10.1.0.2926, faulting module unknown, version 0.0.0.0, fault address 0x00000000.

 

I'm running 2.x version of .NET because, I couldn't get the web app to run on 3.5 on a Windows 2008 R2 x64 IIS server.

 

Does anybody have an information on the optimal environment for using this SDK?

1 comments

0
Avatar
Domingo Rodriguez
Moderator
Comment actions Permalink

When you manually start BarTender on the Windows Server 2003 computer, does BarTender start, or will it crash? Try printing some labels from BarTender. Do they print or do you get an error message?

 

Try running some of our .NET samples, which are found under "Programs > BarTender v10.1 > BarTender .NET SDks > Print SDK samples". If you don't see these samples, please modify the BT installation to include the ".NET SDK examples" and let me know if you get a similar error message when trying to start and interact with these .NET SDK samples.

Please sign in to leave a comment.