Thursday, 14 May 2015

Configuring and opening Visual Studio which has multiple standalone AOS instance on same server

Steps to open a Visual studio pointing to a specific AOS environment
1. Go to client configuration and create a .axc file (For the instance to which AOS must be connected).
2. On the client computer that is running Visual Studio, open the Start menu, right-click Visual Studio 2010, and select Properties.
3. Update the Target field and add the /AxConfig switch as shown below

"C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" /AxConfig "C:\AXConfig\AOS1AX.axc"



Tuesday, 12 May 2015

Dynamics AX EP Install issue : ISAPI Filter ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll’ could not be loaded due to a configuration problem

EP Issue from Event viewer.

ISAPI Filter ‘C:\Windows\Microsoft.NET\Framework\v4.0.30319\\aspnet_filter.dll’ could not be loaded due to a configuration problem. The current configuration only supports loading images built for a AMD64 processor architecture. The data field contains the error number. To learn more about this issue, including how to troubleshooting this kind of processor architecture mismatch error, see http://go.microsoft.com/fwlink/?LinkId=29349.



Solution

Upon closer inspection of the error message I noticed the problem:


v4.0.30319\\aspnet_filter.dll

Windows doesn’t handle double slashes very well as opposed to Linux. What is strange is none of these settings are manually changed which suggests it was perhaps a Windows update that caused this, however I have no evidence beyond change control logs.

I fixed with the following process:


Opened IIS Manager and selected the IIS web server node:




In the middle pane, browse to the IIS section and select ISAPI Filters:




Expand the columns as required, looking for an Executable path with \\ in it, then click Edit:





From the above screenshot, change the \\ to \ so the path reads:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_filter.dll

Dynamics AX Enterprise portal issue: Exception occurred on the metadata service on client or server. See exception details below:>Thread was being aborted.

EP Issue

An error has occurred while redirecting to the default home page set for the Enterprise Portal site http://****:14841/sites/DynamicsAx.  Microsoft Dynamics AX is ignoring this error and redirecting to default.aspx.
Exception occurred on the metadata service on client or server. See exception details below:
>Thread was being aborted.
Microsoft.Dynamics.AX.Framework.Services.Client.MetadataServiceException
   at Microsoft.Dynamics.AX.Framework.Services.Client.ServiceClientHelper.InvokeChannelOperation[TResult,TChannel](IServiceClient`1 client, Func`2 operationInvoker, Func`2 exceptionWrapper)
   at Microsoft.Dynamics.AX.Framework.Services.Client.MetadataServiceProxyFactory.<>c__DisplayClass54.<CreateWebMenuItemMetadataProxy>b__52()
   at Microsoft.Dynamics.AX.Framework.Services.Client.MetadataServiceProxyFactory.CreateWebMenuItemMetadataProxy(WebMenuItemKey webMenuItemKey)
   at Microsoft.Dynamics.AX.Framework.Services.Client.MetadataCache.<.cctor>b__46(String mainKey)
   at Microsoft.Dynamics.AX.Framework.Services.Metadata.MetadataAccessorBase`2.GetItem(TKey key)
   at Microsoft.Dynamics.AX.Framework.Services.Metadata.Caching.ItemCache`2.<>c__DisplayClassc.<GetItemCustom>b__b()
   at Microsoft.Dynamics.AX.Framework.Services.Metadata.Caching.CacheBase.CacheRead(ICacheReadArgs cacheReadArgs, Action tryReadAction, Action readThroughAction)
   at Microsoft.Dynamics.AX.Framework.Services.Metadata.Caching.ItemCache`2.GetItemCustom(TKey key, Func`2 itemAccessor)
   at Microsoft.Dynamics.AX.Framework.Services.Client.WebMenuItemMetadata.GetWebMenuItemReferenceNode[T](ISession session, SysDictMenu menuItemReference)
   at Microsoft.Dynamics.AX.Framework.Services.Client.WebMenuMetadata.InitializeChildren(ISession session, SysDictMenu dictMenu, WebMenuMetadata webMenu)
   at Microsoft.Dynamics.AX.Framework.Services.Client.WebMenuMetadata.GetWebMenuMetadata(ISession session, SysDictMenu dictMenu, Boolean subMenu)
   at Microsoft.Dynamics.AX.Framework.Services.Client.WebMenuMetadata.InitializeChildren(ISession session, SysDictMenu dictMenu, WebMenuMetadata webMenu)
   at Microsoft.Dynamics.AX.Framework.Services.Client.WebMenuMetadata.GetWebMenuMetadata(ISession session, SysDictMenu dictMenu, Boolean subMenu)
   at Microsoft.Dynamics.AX.Framework.Services.Client.WebMenuMetadata.InitializeChildren(ISession session, SysDictMenu dictMenu, WebMenuMetadata webMenu)
   at Microsoft.Dynamics.AX.Framework.Services.Client.WebMenuMetadata.GetWebMenuMetadata(ISession session, SysDictMenu dictMenu, Boolean subMenu)
   at Microsoft.Dynamics.AX.Framework.Services.Client.WebMenuMetadata.GetWebMenuMetadata(ISession session, String webMenuName)
   at Microsoft.Dynamics.AX.Framework.Services.Metadata.Caching.ItemCache`2.<>c__DisplayClassc.<GetItemCustom>b__b()
   at Microsoft.Dynamics.AX.Framework.Services.Metadata.Caching.CacheBase.CacheRead(ICacheReadArgs cacheReadArgs, Action tryReadAction, Action readThroughAction)
   at Microsoft.Dynamics.AX.Framework.Services.Metadata.Caching.ItemCache`2.GetItemCustom(TKey key, Func`2 itemAccessor)
   at Microsoft.Dynamics.AX.Framework.Services.Client.MetadataCache.GetWebMenuMetadata(ISession session, String webMenuName)
   at Microsoft.Dynamics.AX.Framework.Services.Client.WebModuleMetadata.GetWebModuleMetadata(ISession session, SysDictMenu dictMenu, Boolean subModule)
   at Microsoft.Dynamics.AX.Framework.Services.Client.WebModuleMetadata.InitializeChildren(ISession session, SysDictMenu dictMenu, WebModuleMetadata webModule)
   at Microsoft.Dynamics.AX.Framework.Services.Client.WebModuleMetadata.GetWebModuleMetadata(ISession session, SysDictMenu dictMenu, Boolean subModule)
   at Microsoft.Dynamics.AX.Framework.Services.Client.WebModuleMetadata.GetWebModuleMetadata(ISession session, String webModulePath)
   at Microsoft.Dynamics.AX.Framework.Services.Metadata.Caching.ItemCache`2.<>c__DisplayClassc.<GetItemCustom>b__b()
   at Microsoft.Dynamics.AX.Framework.Services.Metadata.Caching.CacheBase.CacheRead(ICacheReadArgs cacheReadArgs, Action tryReadAction, Action readThroughAction)
   at Microsoft.Dynamics.AX.Framework.Services.Metadata.Caching.ItemCache`2.GetItemCustom(TKey key, Func`2 itemAccessor)
   at Microsoft.Dynamics.AX.Framework.Services.Client.MetadataCache.GetWebModuleMetadata(ISession session, String webModulePath)
   at Microsoft.Dynamics.Framework.Portal.UI.WebControls.MasterPageControl.FindRedirectPageForModule(ISession session, String& redirectMenuItemForModule)
   at Microsoft.Dynamics.Framework.Portal.UI.WebControls.MasterPageControl.RedirectToHomePageAndCompany(SPWeb site)
Thread was being aborted.
System.Threading.ThreadAbortException
   at System.Runtime.InteropServices.Marshal.CopyToManaged(IntPtr source, Object destination, Int32 startIndex, Int32 length)
   at System.Net.SafeDeleteContext.InitializeSecurityContext(SecurDll dll, SafeFreeCredentials& inCredentials, SafeDeleteContext& refContext, String targetName, ContextFlags inFlags, Endianness endianness, SecurityBuffer inSecBuffer, SecurityBuffer[] inSecBuffers, SecurityBuffer outSecBuffer, ContextFlags& outFlags)
   at System.Net.SSPIAuthType.InitializeSecurityContext(SafeFreeCredentials credential, SafeDeleteContext& context, String targetName, ContextFlags inFlags, Endianness endianness, SecurityBuffer[] inputBuffers, SecurityBuffer outputBuffer, ContextFlags& outFlags)
   at System.Net.SSPIWrapper.InitializeSecurityContext(SSPIInterface SecModule, SafeFreeCredentials credential, SafeDeleteContext& context, String targetName, ContextFlags inFlags, Endianness datarep, SecurityBuffer[] inputBuffers, SecurityBuffer outputBuffer, ContextFlags& outFlags)
   at System.Net.NTAuthentication.GetOutgoingBlob(Byte[] incomingBlob, Boolean throwOnError, SecurityStatus& statusCode)
   at System.Net.Security.NegoState.GetOutgoingBlob(Byte[] incomingBlob, Win32Exception& e)
   at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
   at System.Net.Security.NegoState.CheckCompletionBeforeNextSend(Byte[] message, LazyAsyncResult lazyResult)
   at System.Net.Security.NegoState.ProcessReceivedBlob(Byte[] message, LazyAsyncResult lazyResult)
   at System.Net.Security.NegoState.StartSendBlob(Byte[] message, LazyAsyncResult lazyResult)
   at System.Net.Security.NegoState.ProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.NegotiateStream.AuthenticateAsClient(NetworkCredential credential, String targetName, ProtectionLevel requiredProtectionLevel, TokenImpersonationLevel allowedImpersonationLevel)
   at System.ServiceModel.Channels.WindowsStreamSecurityUpgradeProvider.WindowsStreamSecurityUpgradeInitiator.OnInitiateUpgrade(Stream stream, SecurityMessageProperty& remoteSecurity)
   at System.ServiceModel.Channels.StreamSecurityUpgradeInitiatorBase.InitiateUpgrade(Stream stream)
   at System.ServiceModel.Channels.ConnectionUpgradeHelper.InitiateUpgrade(StreamUpgradeInitiator upgradeInitiator, IConnection& connection, ClientFramingDecoder decoder, IDefaultCommunicationTimeouts defaultTimeouts, TimeoutHelper& timeoutHelper)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.SendPreamble(IConnection connection, ArraySegment`1 preamble, TimeoutHelper& timeoutHelper)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.DuplexConnectionPoolHelper.AcceptPooledConnection(IConnection connection, TimeoutHelper& timeoutHelper)
   at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
   at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
   at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.Dynamics.AX.Framework.Services.Metadata.Service.IAxMetadataService.GetWebMenuItemMetadata(WebMenuItemKey[] menuItemKey)
   at Microsoft.Dynamics.AX.Framework.Services.Client.ServiceClientHelper.InvokeChannelOperation[TResult,TChannel](IServiceClient`1 client, Func`2 operationInvoker, Func`2 exceptionWrapper)



Resolution
Change connection time-out properties in the web.config file
1.    In a basic text editor such as Notepad, open the web.config file for example %SYSTEMDRIVE%\Inetpub\wwwroot 
-or- 
%SYSTEMDRIVE%\\Inetpub\wwwroot\wss\VirtualDirectories\
14841
folder (Here 14841 is my port folder)
1.    Press CTRL + F to open the Find dialog box.
2.    Find the following tag:
<httpRuntime maxRequestLength="51200" />
3.    Replace it with this tag:
<httpRuntime executionTimeout="6000" maxRequestLength="51200" />
4.    Find the following tag (you might have to search from the beginning of the file):
</sectionGroup>
5.    Add the following tags on new lines after the </sectionGroup> tag:
<sectionGroup name="DynamicsAX">
<section name="Deployment" type="System.Configuration.SingleTagSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</sectionGroup>
6.    Find the following tag:
</SharePoint>
7.    Add the following tags on new lines after the </SharePoint> tag:
<DynamicsAX>
<Deployment SiteCreationTimeOut="1200" />
</DynamicsAX>
8.    Save your changes, and close the web.config file.
9.    At the command prompt, type iisreset, and then press ENTER.