'mixed Mode Assembly Is Built Against Version 'v2.0.50727' Of The Runtime And Cannot Be Loaded In The 4.0 Runtime
I am getting the below error when I run "Library lib = new Library();".
A ''System.IO.FileLoadException'' was thrown from the .NET AppDomain ''PTS_Beta_Print'' to the broker from the source ''Seagull.Security'' with the message ''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.''.
The stack trace for the exception is '' at Seagull.Security.EffectivePermissionsManager..ctor()
at Seagull.Librarian.Core.SecuritySupport.ValidatePermission(SecurityApplication application, SecurityPermission permission)
at Seagull.Librarian.Core.SecuritySupport.ValidatePermission(SecurityPermission permission)
I have tried to compile with the below but had no luck.
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
stack trace seems to indicate this has something to do with security setting(?).
Please give your advice on this problem.
I have resolved the issue by placing app.config where the first appDomain created.0
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.
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.
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.
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.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +337
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
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
Here is the info you requested.
The world's leading software for label, bar code, RFID and card printing.
Edition: Enterprise Automation (3 Printers)
Version: 10.0 SR4
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
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
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!
Is no one active on this forum?0
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
"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
will complie some test results ang get back to you. Thanks for responding!0
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
Please sign in to leave a comment.