Seagull.bartender.print Or One Of Its Dependencies. An Attempt Was Made To Load A Program With An Incorrect Format. 追蹤

0
Avatar
Legacy Poster

environment:
win 7 - 64 bit -sp1
bartender 10.0  SR4 - build 2868 (licensed)
visual studio express 2013 for web
iis 7.5
 
using c#/asp.net
 
i created a very simple web application very similar to what ian c's  pinned post above with 
the exception i am using C# and its web based.
works fine, i can print labels.
 
my plan is to have other pc's within the company access the application i am developing.
 
so i published it, no errors. (my development pc and the iis is the same machine)
i went to another pc to access the application and i got this error:
 
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.
 
Stack Trace: 
 
 
 
[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, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0
   System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +234
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection) +108
   System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +25
   System.Reflection.Assembly.Load(String assemblyString) +34
   System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +49
 
[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) +772
   System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +259
   System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +163
   System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +230
   System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +76
   System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +139
   System.Web.Compilation.BuildManager.ExecutePreAppStart() +176
   System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +882
 
[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) +579
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +120
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712
 
my app.config looks like this
 
<?xml version="1.0"?>
<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
  </startup>
</configuration>
 
The Seagull.Bartender.Print is from this folder
C:\Windows\assembly\GAC_32\Seagull.BarTender.Print\10.0.4.1__109ff779a1b4cbc7\Seagull.BarTender.Print.dll
 
anyone can help me to resolve this problem?
 
thanks!
 

2 意見

0
Avatar
Legacy Poster
評論操作 永久連結

anyone from seagull scientific?

0
Avatar
Legacy Poster
評論操作 永久連結

i figured it out.

you have to enable 32-bit application set to true in IIS application settings

登入寫評論。