WCF Service can not find files when deployed

socom1985
socom1985 used Ask the Experts™
on
My WCF service has problems finding its dependency's when I deploy it on the webserver. All DLL's are being deployed with the service in the /bin folder.. I have no idea how to fix this..

Here is the error:


  Exception type: ConfigurationErrorsException
    Exception message: Could not load file or assembly 'E3k.Api' or one of its dependencies. An attempt was made to load a program with an incorrect format.
   at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)
   at System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
   at System.Web.Configuration.AssemblyInfo.get_AssemblyInternal()
   at System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)
   at System.Web.Compilation.BuildManager.CallPreStartInitMethods()
   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Technical Architect
Commented:
Are you using any 3rd party DLL or umanaged dll in your project ? You referenced assembly might me referencing some other dll. Use ILDasm to see what assemebly are dependent on other assembly.
Most Valuable Expert 2012
Top Expert 2008

Commented:
How is the assembly built?  

Will it be running on a 64-bit server, and built as a 64-bit or Any CPU?
 
If it is IIS, how is the server application pool configured?

Author

Commented:
Third Party DLL caused the problem

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial