Zum Hauptinhalt gehen

Suche

Suche

Unable To Load The Seagull.bartender.print Using Asp.net 4.0

Kommentare

4 Kommentare

  • Avatar
    Ian Cummings
    Moderator
    Note that the edition of BarTender installed needs to be the Automation edition or higher. If running the Trial then the trial period should not be elapsed.

    The following steps show how to add the BarTender .NET SDK into a Visual Studio 2010 project.

    1) When VS2010 starts select "New Project" on the start page.

    2) Select ".Net Framework 4" and the project's template type and name.

    3) In the Solution Explorer right mouse click on the project name and select Properties.

    4) On the Application tab change the Target framework to be ".NET Framework 4". The solution will reload.

    5) In the "Solution Explorer" right mouse click on the Reference folder and select "Add Reference…"

    6) If using BarTender version 9.4 or later, select the ".NET" tab and select the Component Name "Seagull.BarTender.Print".

    If using BarTender version 9.3 or earlier, select the "Browse" tab, navigate to the folder "<Program Files>\BarTender Suite\SDK\Assemblies", and select the file Seagull.BarTender.Print.dll

    7) In the Solution Explorer edit the file app.config and change the contents to be:

    <?xml version="1.0"?>
    <configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    </startup>
    </configuration>
    The notable change is that "useLegacyV2RuntimeActivationPolicy=true".

    8) Add a button to your project's form and write BarTender SDK code as per documentation and samples.

    9) Compile and run application.
    0
  • Avatar
    Legacy Poster

    I followed the above and put it undere web.config. I am getting the below error. any idea?

    An attempt was made to load a program with an incorrect format.

    Assembly Load Trace: The following information can be helpful to determine why the assembly 'BTTemplates' could not be loaded.
     


    === Pre-bind state information ===
    LOG: User = IIS APPPOOL\BTWebService AppPool
    LOG: DisplayName = BTTemplates
     (Partial)
    WRN: Partial binding information was supplied for an assembly:
    WRN: Assembly Name: BTTemplates | Domain ID: 2
    WRN: A partial bind occurs when only part of the assembly display name is provided.
    WRN: This might result in the binder loading an incorrect assembly.
    WRN: It is recommended to provide a fully specified textual identity for the assembly,
    WRN: that consists of the simple name, version, culture, and public key token.
    WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
    LOG: Appbase = file:///C:/inetpub/web_sites/BTWebService/
    LOG: Initial PrivatePath = C:\inetpub\web_sites\BTWebService\bin
    Calling assembly : (Unknown).
    ===
    LOG: This bind starts in default load context.
    LOG: Using application configuration file: C:\inetpub\web_sites\BTWebService\web.config
    LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
    LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/39cf30af/9ae5d663/BTTemplates.DLL.
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/root/39cf30af/9ae5d663/BTTemplates/BTTemplates.DLL.
    LOG: Attempting download of new URL file:///C:/inetpub/web_sites/BTWebService/bin/BTTemplates.DLL.
    ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
    
    0
  • Avatar
    Domingo Rodriguez
    Moderator

    Please make sure that the right Edition is in use (if you're developing a web based application which will make use of the .NET Print Server SDK, make sure that you own an Enterprise Automation Edition of BarTender or a Trial Edition with sufficient Trial days left and which is simulating the Enterprise Automation Edition).

     

    I'm not quite sure if adding "useLegacyV2RuntimeActivationPolicy="true" to the web.config is required / correct. It is indeed used for app.config, but if you're developing a web based application this might not be required.

     

    I suggest instead that you put your web based application into a separate 32 bit application pool, and then try starting the application pool using a different Windows account with sufficient credentials. If this is an account permission issue, starting the application pool under a different Windows account might help. Also, in order to double check that the application pool which is running your web application is a 32 bit pool, please follow the instructions below:

     

    1. Open IIS 7 on the server
    2. Expand the server listing > click on Application Pools
    3. Click on the site’s application pool to select it
    4. In the right hand column, click on Edit Application Pool > Advanced Settings…
    5. In the popup, go to General> Enable 32 bit Applications > change to “True
    6. click ok
    7. In the right hand column, click on Application Pool Tasks > Recycle (or you can stop and start the app pool, if you prefer)

     

     

    Did you already try to stop IIS, then open a command prompt dialog in Windows ("Start > Run", then type cmd), browse to the Program Files folder where BarTender Suite is installed, and then run the following command

    bartend.exe /register

     

    If you still have problems, you might wish to install BarTender Web Print Server as part of BarTender's installation. BarTender Web Print Server (BT-WPS) is our closed web based printing solution. You can test to see if BT-WPS works correctly for you and also take a look at the web.config file it makes use of. The following assembly is added in the web.config file for BT-WPS. I'm not sure if your web based application adds the same assembly:

     

    <add assembly="Seagull.BarTender.Print, Version=10.0.4.1, Culture=neutral, PublicKeyToken=109FF779A1B4CBC7" />

     

    Hope this helps.

    0
  • Avatar
    Ian Cummings
    Moderator

    Check out BarTender 2016, now supporting x64 and .NET framework 4.0: http://www.seagullscientific.com/downloads/label-software/barcode-label-printing-software-download/

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.