Community
Showing results for 
Search instead for 
Do you mean 
Reply

Could not load file or assembly 'Act.Server.Contracts' or one of its dependencies

Copper Elite Contributor
Posts: 193
Country: Belgium

Could not load file or assembly 'Act.Server.Contracts' or one of its dependencies

Hi ,

 

I use the Act For web 2012 .

this application is installed on a windows 2008 r2 standard server.

he is also a domain controller.

 

when I open the application (http://localhost/apfw)  I have got the following error :

 

I have investigated several hours, but with no result.

I anyone a solution?

 

Server Error in '/APFW' Application.


 

Could not load file or assembly 'Act.Server.Contracts' 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 'Act.Server.Contracts' 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 'Act.Server.Contracts' could not be loaded.

=== Pre-bind state information ===
LOG: User = KIJKBOUW\Administrator
LOG: DisplayName = Act.Server.Contracts
 (Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Act.Server.Contracts | Domain ID: 4
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:/Program Files (x86)/ACT/Act for Web/APFW/
LOG: Initial PrivatePath = C:\Program Files (x86)\ACT\Act for Web\APFW\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\ACT\Act for Web\APFW\web.config
LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\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:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/apfw/942acf3a/bb0c9b19/Act.Server.Contracts.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/apfw/942acf3a/bb0c9b19/Act.Server.Contracts/Act.Server.Contracts.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/ACT/Act for Web/APFW/bin/Act.Server.Contracts.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.

Stack Trace:

[BadImageFormatException: Could not load file or assembly 'Act.Server.Contracts' 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 'Act.Server.Contracts' 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) +11568160
   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 'Act.Server.Contracts' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11700896
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4869125

 

on event viewer I see the following error

see attachment.

Daniel Dendooven
Retired Act! Certified Consultant
Platinum Elite Contributor
Posts: 6,537
Country: USA

Re: Could not load file or assembly 'Act.Server.Contracts' or one of its dependencies

Hello Daniel,
This error has been known to be caused by User Account Control. Has this been disabled on the server?

Greig Hollister

Note: Effective 6/1/13, Sage no longers provides support for the Act! software. This is now provided by Swiftpage.

Copper Elite Contributor
Posts: 193
Country: Belgium

Re: Could not load file or assembly 'Act.Server.Contracts' or one of its dependencies

yes, this is disabled.  I have already check this.

Daniel Dendooven
Retired Act! Certified Consultant
Platinum Elite Contributor
Posts: 6,537
Country: USA

Re: Could not load file or assembly 'Act.Server.Contracts' or one of its dependencies

Have you:
- Looked at the Act.Server.Contracts.dll file and made sure it is the correct version and properly registered?
- Tried uninstalling/reinstalling APFW?
- Tried a different Admin account on the server?
- If possible, tried on another server?
- Done any troubleshooting with .NET?

Greig Hollister

Note: Effective 6/1/13, Sage no longers provides support for the Act! software. This is now provided by Swiftpage.

Copper Super Contributor
Posts: 167
Country: USA

Re: Could not load file or assembly 'Act.Server.Contracts' or one of its dependencies

We had this issue with 15.1 and a custom vir Dir.
We found that the app pool was set to False on enabled 32 bit. Changed it to TRUE, and make sure that .net version is version 4. and custom VirDir works perfectly now.

Jeremy Wesley
MCSE+I, MCDBA, MCSD, ACC, APT, A++
www.act.expert
Have you seen eXact Contacts? iPhone & iPad App that syncs directly with your Act! Database.