Thank you for the prompt reply!! =)
What I meant is that the 32 bit DLL works but the application cannot recognize my printer if the application pool setting "Enable 32-Bit Applications" is set to TRUE(I keep this set to FALSE). The 32bit DLL requires this setting to run therefore I am stuck trying to get the 64 bit DLL to work.
I am Running a .NET 4.0 application in VS2010 on a Windows7 Ultimate SP1 64-bit OS developer machine, using the Cassini WebDev WebServer for localhost development. On my Web Project, the Properities -> Build -> Platform Target is set to "Any CPU".
I am trying to use the ceTe.DynamicPDF.PrintManager.40.x64.dll assembly version 1.0.1.20321
Error and Stack Track:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Could not load file or assembly 'ceTe.DynamicPDF.Printing.40.x64' 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 'ceTe.DynamicPDF.Printing.40.x64' 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 'ceTe.DynamicPDF.Printing.40.x64' could not be loaded.
=== Pre-bind state information ===
LOG: User = MUNHAIL\speters
LOG: DisplayName = ceTe.DynamicPDF.Printing.40.x64
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: ceTe.DynamicPDF.Printing.40.x64 | Domain ID: 16
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:/Projects/Apps-Development-Maintenance2/Smac/Smac.Web/
LOG: Initial PrivatePath = C:\Projects\Apps-Development-Maintenance2\Smac\Smac.Web\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Projects\Apps-Development-Maintenance2\Smac\Smac.Web\web.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\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:/Users/speters/AppData/Local/Temp/Temporary ASP.NET Files/root/1a76fb18/d21a5706/ceTe.DynamicPDF.Printing.40.x64.DLL.
LOG: Attempting download of new URL file:///C:/Users/speters/AppData/Local/Temp/Temporary ASP.NET Files/root/1a76fb18/d21a5706/ceTe.DynamicPDF.Printing.40.x64/ceTe.DynamicPDF.Printing.40.x64.DLL.
LOG: Attempting download of new URL file:///C:/Projects/Apps-Development-Maintenance2/Smac/Smac.Web/bin/ceTe.DynamicPDF.Printing.40.x64.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.
Stack Trace:
[BadImageFormatException: Could not load file or assembly 'ceTe.DynamicPDF.Printing.40.x64' 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.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +39
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks) +132
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +144
System.Reflection.Assembly.Load(String assemblyString) +28
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +46
[ConfigurationErrorsException: Could not load file or assembly 'ceTe.DynamicPDF.Printing.40.x64' 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) +618
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +209
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +130
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +178
System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies() +94
System.Web.Compilation.BuildManager.CallPreStartInitMethods() +332
System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +677
[HttpException (0x80004005): Could not load file or assembly 'ceTe.DynamicPDF.Printing.40.x64' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9088636
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +97
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +258
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272