Assembly error 'Microsoft.Dynamics.BusinessConnectorNet.dll'

doodoo Member Posts: 12
edited 2009-11-17 in Dynamics AX
Hi,

I've create a webservice using BusinessConnector to communicate with Microsoft Dynamics AX2009.

I've developped it by adding reference to Microsoft.Dynamics.BusinessConnectorNet.dll into webservice.
The Path for dll is correct but when I try to test webservice, I receive an error loading file or assembly !!!

Here is the error :
Could not load file or assembly 'Microsoft.Dynamics.BusinessConnectorNet' 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 'Microsoft.Dynamics.BusinessConnectorNet' 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 'Microsoft.Dynamics.BusinessConnectorNet' could not be loaded.


=== Pre-bind state information ===
LOG: User = XXX\xxxxxxx
LOG: DisplayName = Microsoft.Dynamics.BusinessConnectorNet
(Partial)
LOG: Appbase = file:///C:/AXWebserviceISA/AXWebserviceISA/AXWebserviceISA/
LOG: Initial PrivatePath = C:\AXWebserviceISA\AXWebserviceISA\AXWebserviceISA\bin
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\AXWebserviceISA\AXWebserviceISA\AXWebserviceISA\web.config
LOG: Using host configuration file: \\?\C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet.config
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\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/v2.0.50727/Temporary ASP.NET Files/axwebserviceisa/724bc418/67e696a0/Microsoft.Dynamics.BusinessConnectorNet.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework64/v2.0.50727/Temporary ASP.NET Files/axwebserviceisa/724bc418/67e696a0/Microsoft.Dynamics.BusinessConnectorNet/Microsoft.Dynamics.BusinessConnectorNet.DLL.
LOG: Attempting download of new URL file:///C:/AXWebserviceISA/AXWebserviceISA/AXWebserviceISA/bin/Microsoft.Dynamics.BusinessConnectorNet.DLL.
ERR: Failed to complete setup of assembly (hr = 0x8007000b). Probing terminated.



Stack Trace:


[BadImageFormatException: Could not load file or assembly 'Microsoft.Dynamics.BusinessConnectorNet' 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 throwOnFileNotFound, Boolean forIntrospection) +0
System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +416
System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) +166
System.Reflection.Assembly.Load(String assemblyString) +35
System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective) +190

[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.Dynamics.BusinessConnectorNet' 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) +11200744
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() +388
System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai) +232
System.Web.Configuration.AssemblyInfo.get_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.BuildManager.CompileWebFile(VirtualPath virtualPath) +502
System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +476
System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile) +116
System.Web.UI.WebServiceParser.GetCompiledType(String inputFile, HttpContext context) +77
System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext context, String verb, String url, String filePath) +231
System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) +89
System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +564
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +263

Have someone any ideas ? I try to solve this point since 3 days and any solution. And I didn't find anything on the net.
](*,)

Thanks for your help !

Comments

  • akerstiensakerstiens Member Posts: 15
    I was wondering if you have ever got a response or if you were able to find the solution. I am running into the same problem.
  • jemmyjemmy Member Posts: 247
    Have you tried to open a case with Microsoft Support? Let us know how it goes...

    Cheers,

    Jemmy
  • rajubodkhe28rajubodkhe28 Member Posts: 4
    I am creating web appliction with Asp.net & C#.net using Navision 2009 sp1 web services. I want to add Dynamic web reference using Reflection namespace. I manage it with read data for sales order from Navision but not able to insert and update it into Navision Database .i used below link for reference

    https://community.dynamics.com/blogs/na ... -c-35.aspx

    can any one help me to solve this issue

    Regards
    ღ Raju ღ
Sign In or Register to comment.