Tuesday, 12 May 2015

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.





No comments:

Post a Comment