Web service error

Server Error in ‘/MicrosoftDynamicsAXAif60’ Application.


Could not load file or assembly ‘file:///C:\Program Files\Microsoft Dynamics AX\60\AifWebServices\bin\Microsoft.Dynamics.Ax.Services.MzkSalesHeaderStgService.dll’ or one of its dependencies. The system cannot find the file specified.

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.IO.FileNotFoundException: Could not load file or assembly ‘file:///C:\Program Files\Microsoft Dynamics AX\60\AifWebServices\bin\Microsoft.Dynamics.Ax.Services.MzkSalesHeaderStgService.dll’ or one of its dependencies. The system cannot find the file specified.

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 ‘file:///C:\Program Files\Microsoft Dynamics AX\60\AifWebServices\bin\Microsoft.Dynamics.Ax.Services.MzkSalesHeaderStgService.dll’ could not be loaded.



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

Stack Trace:



<br>[FileNotFoundException: Could not load file or assembly 'file:///C:\Program Files\Microsoft Dynamics AX\60\AifWebServices\bin\Microsoft.Dynamics.Ax.Services.MzkSalesHeaderStgService.dll' or one of its dependencies. The system cannot find the file specified.]<br> System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +0<br> System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks) +234<br> System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark) +174<br> System.Reflection.Assembly.LoadFrom(String assemblyFile) +54<br> Microsoft.Dynamics.Ax.Services.Host.AxServiceHost.LoadServiceAssembly(String serviceAssemblyName) +212<br> Microsoft.Dynamics.Ax.Services.Host.AxServiceHost..ctor(ServiceElement serviceElement, String axServiceAssemblyName, Type routerServiceType, RoutingConfiguration routingConfiguration, Configuration serviceConfiguration, String portName, Uri[] baseAddresses) +177<br> Microsoft.Dynamics.Ax.Services.Host.AxServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses) +404<br> System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +1849<br> System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +66<br> System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +738<br><br>[ServiceActivationException: The service '/MicrosoftDynamicsAXAif60/MzkSalesHeaderStgService/xppservice.svc' cannot be activated due to an exception during compilation. The exception message is: Could not load file or assembly 'file:///C:\Program Files\Microsoft Dynamics AX\60\AifWebServices\bin\Microsoft.Dynamics.Ax.Services.MzkSalesHeaderStgService.dll' or one of its dependencies. The system cannot find the file specified..]<br> System.Runtime.AsyncResult.End(IAsyncResult result) +604403<br> System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +238<br> System.ServiceModel.Activation.ServiceHttpModule.EndProcessRequest(IAsyncResult ar) +435220<br> System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +116<br><br>


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.81.0

Can you give us some context, please? What were you doing when you got this error?

Hi Martin,

From IIS, right clicked the service and browse and it opens in the browser like below:

localhost - /MicrosoftDynamicsAXAif60/BookingService/

[To Parent Directory]

8/21/2017 3:22 PM 4700 web.config
8/21/2017 3:22 PM 383 xppservice.svc

when i click the xppService.svc link i got the error.

What is MzkSalesHeaderStgService? Are you developing it, trying to deploy it to another environment or what?

Its a Custom service

I tried default services also.