Saltar al contenido principal

Búsqueda

Búsqueda

'mixed Mode Assembly Is Built Against Version 'v2.0.50727' Of The Runtime And Cannot Be Loaded In The 4.0 Runtime

Comentarios

10 comentarios

  • Avatar
    Legacy Poster

    I have resolved the issue by placing app.config where the first appDomain created.

    0
  • Avatar
    Legacy Poster

    I am trying to create WCF service using BarTender SDK. application is working fine in dev env( development server) but if I deploy it into IIS I am getting below response.

     

    Server Error in '/' Application.

    Could not load file or assembly 'Seagull.BarTender.Print' or one of its dependencies. An attempt was made to load a program with an incorrect format.

     

    Description:

    An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details:

    System.BadImageFormatException: Could not load file or assembly 'Seagull.BarTender.Print' or one of its dependencies. An attempt was made to load a program with an incorrect format.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Assembly Load Trace:

    The following information can be helpful to determine why the assembly 'Seagull.BarTender.Print' could not be loaded.

     

    [BadImageFormatException: Could not load file or assembly 'Seagull.BarTender.Print' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
       System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
       System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +567
       System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +192
       System.Reflection.Assembly.Load(String assemblyString) +35
       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +123

    [ConfigurationErrorsException: Could not load file or assembly 'Seagull.BarTender.Print' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
       System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +11569328
       System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +485
       System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +79
       System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +337
       System.Web.Compilation.BuildManager.CallPreStartInitMethods() +280
       System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +1167

    [HttpException (0x80004005): Could not load file or assembly 'Seagull.BarTender.Print' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11702064
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
       System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4870277

     

    any idea?

    0
  • Avatar
    Domingo Rodriguez
    Moderador

    Are you using a Trial Edition or full license of BarTender? If you're using a Trial Edition, let me know how many Trial days are left under the "Help > About" dialog of BarTender apart from the version and build in use. If you've a full license of BarTender, what exact Edition, version and build of BarTender is in use?

     

    Also, on which version and service pack of Windows are you running?

     

    Does the error message also appear when you open your web based application from a web browser which is opened on the same PC as IIS and BT runs?

     

    Is there any chance that you can install our closed product BT-WPS

     

     

    Is there any chance for you to install BT-WPS (BarTender Web Print Server) on this same server and let us know if you’ve any problems to run BT-WPS? BT-WPS can be installed as part of BarTender's web installer, so you will just need to modify the BarTender installation under "Programs & Features", and proceed to also install BT-WPS.

    0
  • Avatar
    Legacy Poster

    Here is the info you requested.

     

    BarTender
    The world's leading software for label, bar code, RFID and card printing.
    Edition: Enterprise Automation (3 Printers)
    Version: 10.0 SR4
    Build: 2868
    Activation Status: Activated
     

    I am testing this on windows 2008 R2 enterprise(x64) SP1.

    I have just installed print server and can access BT-WPS using browser.

     

    one difference I noticed is that print server is using V2 .NET framework. and WCF service requires V4 NET framework.

    I have a support #. please let me know if you want me to open service ticket for this issue.

    0
  • Avatar
    Legacy Poster

    Hi,

    I´m trying to deploy a project , and are getting the: ''Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.''.

     

    I´ve solved this before by adding
     

    startup useLegacyV2RuntimeActivationPolicy="true">

     

    app.config file, but then I had Visual studio installed on that PC.  Do I have to put app.config some where after install of the application? Any help would be apprecitated!

     

     

    /Fredrik

    0
  • Avatar
    Legacy Poster

    Is no one active on this forum?

    0
  • Avatar
    Domingo Rodriguez
    Moderador

    Fredrik,

     

    If you've already compiled your application and made the executable file, no you shouldn't need to put the app.config specially on a specific folder. Have you installed your .NET SDK application on another PC (with BT as well installed on this PC) and have you had any problems? If yes, which problems did you obtain?

    0
  • Avatar
    Domingo Rodriguez
    Moderador

    "Byunminsung", if the problem still persists then yes, please contact us either by email or phone. Do you get this error message no matter if the application pool under which the web based application runs under a different identity (a different Windows account)?

    0
  • Avatar
    Legacy Poster

    will complie some test results ang get back to you. Thanks for responding!

    0
  • Avatar
    Ian Cummings
    Moderador

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

    0

Iniciar sesión para dejar un comentario.