{}

Our Brands

Impact-Company-Logo-English Black-01-177x54

Welcome to the Schneider Electric Website

Welcome to our website.
Search FAQs
ION Enterprise 6.0 Webreach and Web Reporter Error: "Server Error in '/Web' Application. Could not load file or assembly 'Administration' or one of its dependencies. An attempt was made to load a program with an incorrect format."

Goals and Symptoms

This error message appears when attempting to navigate to http://localhost/ion or http://localhost/web on an ION Enterprise v6.0 server:


Error Message Text:

Server Error in '/Web' Application.

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

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Micorsoft\FusionEnableLog].

Stack Trace:
[BadImageFormatException: Could not load file or assembly 'Administration' or one of its dependencies. An attempt was made to load a program with an incorrect format.]
System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNot Found, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef', Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean for Introspection) +416
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean for Introspection) +166
System.Reflection.Assembly.Load(String assemblyString) +35
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190

[ConfigurationErrorException: Could not load file or assembly 'Administration 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) +11207304
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +388
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +232
System.Web.Configuration.AssemblyInfo.gat_AssemblyInternal() +48
System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig) +210
System.Web.Compilation.BuildProvidersCompiler..ctor(VirtualPath configPath, Boolean supportLocalization, String outputAssemblyName) +76
System.Web.Compilation.CodeDirectoryCompiler.GetCodeDirectoryAssembly(VirtualPath virtualDir, codeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories, Boolean is DirectoryAllowed) +11196482
System.Web.Compilation.BuildManager.CompileCodeDirectory(VirtualPath virtualDir, CodeDirectoryType dirType, String assemblyName, StringSet excludedSubdirectories) +185
System.Web.Compilation.BuildManager.EnsureFirstTimeDirectoryInit(VirtualPath virtualDir) +362
System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey, Boolean keyFromVPP, VirtualPath virtualPath, Int64 hashCode) +279
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +110
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +116
System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext, Boolean allowCrossApp, Booean noAssert) +175
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +52
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +50
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +503
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
System.Web.HttpApplication.ExecuteStep(IExecuteStep step, Boolean& completedSynchronously) +263

Version Information: Microsoft .NET Framework Version2.0.50727.4927; ASP.NET Version:2.0.50727.4927

Causes and Fixes

If you are running IIS 7 with a 64 bit operating system, follow these steps to resolve the problem:
1) Go to Control Panel > Administrative Tools > Internet Information Services (IIS)
2) Expand down to the Application Pools in the tree.
3) Right click on the application pool that is being used and select Advanced Settings
-------------------------------------------
NOTE: The application that is being used by ION Enterprise web applications is usually one or both of the following:
Classic .NET AppPool
DefaultAppPool
If you do the recommended settings changes for these application pools, that should be sufficient. It may be useful to note that it is possible to check exactly which application pool is being used by doing the following:
(a) Start > Run > "inetmgr"
(b) In "Internet Information Services (IIS) Manager, expand the tree in the left hand pane to MACHINENAME\username \ Sites \ "Default Web Site" and click on "Default Web Site" to highlight it.
(c) In the right-hand pane, click on "View Applications".
(d) Check the "Application Pool" that is referred to under the column of the same name.
-------------------------------------------
4) Change the Enable 32-bit Applications to True
5) Set Identity to network service.
6) Click Ok.
7) Still in the IIS Manager, in the left pane, Select Default Website > In the Middle pan, double click the Handler Mapping".
8) In the Right Pane, click Edit Feature Permissions" and configure the permissions for read, script and execute.

    • It is ALSO advised that you remove Enhanced Internet Explorer Security. You can perform this by navigating back to the Server Manager, and Selecting Configure IE ESC. Once the configuration window appears, disable the enhanced security for all users.


If you are running a version of IIS before 7 with a 64 bit operating system follow these steps to resolve the issue:
1) Click Start, click Run, type cmd in the Open box, and then click OK.
2) Change to the following directory: \\%homedrive%:\Inetpub\Adminscripts
3) In the Adminscripts folder, type the following command, and then press ENTER: adsutil.vbs set w3svc/AppPools/Enable32bitAppOnWin64 1
4) Type iisreset, and then press ENTER.
5) Navigate to the correct 32bit framework directory (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 for v2 on x64) and run 'aspnet_regiis.exe -i'.
6) go into IIS -> Web Service Extensions and "Allow" 'ASP.NET v2.0.50727 (32-bit)'


Document Change History

Date and InitialsComments
2012-Sepy-07 DRM* Added NOTE to clarify which application pools to alter the properties of under instruction (3) of the 1st section in "Causes and Fixes".


Date Created: June 11, 2010
Last Revised:Sept 7th, 2012
Public
Original Author: MN
All content © 1992-2010 Schneider Electric

Legacy KB System (APS) Data: RESL202631 V3.0, Originally authored by LaAd on 06/16/2010, Last Edited by EdFa on 06/25/2013
Related ranges: ION Enterprise V6.0

Schneider Electric South Africa

Explore more
Range:
Articles that might be helpful Users group

Discuss this topic with experts

Visit our Community for first-hand insights from experts and peers on this topic and more.
Explore more
Range: