Skip to main content

Getting Error on AIF Web service enabling for custom class in Ax 2012

Problem
I am Getting below Errors on AIF Web service enabling for custom class in Ax 2012.

1.Application pool 'MicrosoftDynamicsAXAif60' is being automatically disabled due to a series of failures in the process(es) serving that application pool.


2.
There was an error during processing of the managed application service auto-start for configuration path: 'MACHINE/WEBROOT/APPHOST/Default Web Site/MicrosoftDynamicsAXAif60'. The error message returned is: 'An initialization error occurred while trying to preload an application.

Exception: System.Configuration.ConfigurationErrorsException

Message: Duplicate type with name 'Dynamics.Ax.Application.NewItem' in assembly 'Dynamics.Ax.Application, Version=6.3.1000.309, Culture=neutral, PublicKeyToken=null'.

StackTrace:    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(String preStartInitListPath, Boolean& isRefAssemblyLoaded)
   at System.Web.Compilation.BuildManager.ExecutePreAppStart()
   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException)

InnerException: System.BadImageFormatException

Message: Duplicate type with name 'Dynamics.Ax.Application.NewItem' in assembly 'Dynamics.Ax.Application, Version=6.3.1000.309, Culture=neutral, PublicKeyToken=null'.

StackTrace:    at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName, Boolean starDirective)'.  The worker process will be marked unhealthy and be shutdown.  The data field contains the error code.


Solution:After struggling a lot I found solution for this which I am sharing here to help you and save your time.

Following steps I did to resolve this issues.

1.Stop AOS, 
2.Truncate table SYSXPPAssembly, 
3.delete folder xppil form Bin folder
C:\Program Files\Microsoft Dynamics AX\60\Server\AX_60_Dynamics_TEST\Bin\
4.Run AOS services, 
5.Axbuild, and full compile full cil
6.the problem cause the dll and net module not refresh delete all file in C:\Program Files\Microsoft Dynamics AX\60\AifWebServices\Bin
7.Enable customized port in ax again 
Now problem resolved enjoy and happy daxing.

Popular posts from this blog

How to set up parent project in project accounting in ax 2012

create simple project and then go to the project hierarchy fast tab and there you must define sub-project ID format "-#" and then your sub-project will be enabled. For resource assigning in Project first you need to configure the HR module, in that you need to maintain the calendar for those employees and then you need to define the cost of that particular employee (for expense) and for Revenue you need to define the sales price of that particular employee. In the project accounting module you need to mention the calendar in scheduling fast tab and then you need to define WBS, in WBS activity you can be able to assign resources.

Sales order posting Error - Voucher do not balance as per date in axapta 2012

Problem - How to get rid of this error if its coming while doing the sales invoice . "The transactions on voucher V-00001 do not balance as per 4/11/2014. (accounting currency: -1111- reporting currency: -232) " .  Suggestions: 1.Exchange rate setup , number sequence of invoice voucher, currency rounding all are done correctly , but still this error exists 2.Define currency for each account..or go in currency setup and check currency and rounding up rules 3.Check with penny difference in GL 4.Check there is proper conversion exchange rate defined for reporting currencies. 5. Check Rounding of option of for primary and reporting currencies both. 6.Check all the posting accounts defined in Posting profiles 7.check COGS, Customer, issue, revenue accounts are mapped. 8.Check primary and reporting currency has proper exchange rates and rounding rules defined. 9.Try to increase the value in the penny difference and then post the sales invoice. 10. Make sure ...