最新消息:ww12345678 的部落格重装上线,希望大家继续支持。

How to install and configure Windows AppFabric for AX 2012 Enterprise Portal in a multi-server web farm

网络文摘 William 2467浏览 0评论

 

When setting up AX 2012 Enterprise Portal (EP) in a multi-server web farm, then setting up AppFabric caching is required. This is for caching session info.

When installing SharePoint 2013 it is recommended to use the prerequisite installer to install AppFabric, ref https://technet.microsoft.com/library/jj219572(office.15).aspx section “Plan for the Distributed Cache service”.

Note: If you are using custom applications (DAX Enterprise Portal is a custom SharePoint application) in SharePoint Server 2013 which use the AppFabric client APIs, or are creating custom caches, you should create a separate AppFabric cache cluster to support your custom applications. Do not use the AppFabric cache cluster supporting your SharePoint Server 2013 farm. Run your separate AppFabric cache cluster for your custom applications on separate servers from the servers dedicated to your SharePoint Server 2013 farm.

 

Recommended setup:

Install SharePoint 2013 on the web servers in the farm.

Install and configure AppFabric cache on separate servers (cache cluster not running SharePoint), see https://technet.microsoft.com/en-us/library/dn473937.aspx section “Install and configure Windows Server AppFabric in a cluster”. Do only process 1-4.

Install EP in the web farm using host header, see https://blogs.msdn.microsoft.com/axsupport/2015/11/09/how-to-install-ax-2012-enterprise-portal-in-a-multi-server-web-farm/

If you already have a web server running EP on a web application that was not created with host header and you want to add more web servers to the farm, then you need to create a new web application using host header and then install EP on that web application.

On the EP servers you now need to configure the AppFabric caching. Continue with configure cache client, process 5 in this article https://technet.microsoft.com/en-us/library/dn473937.aspx , on each EP server running as web front end (WFE). Important: See the comment to the article. Do not install the cache client as this is already installed by the SharePoint prerequisite installer, but start from step 4.

When cache clients are configured, then continue with process 6 Validate deployment.

Examples to come.

 

Setup in test systems:

Install SharePoint 2013 on the web servers in the farm.

In this example I have used 3 web servers, 1 running SharePoint Central Administration (CA) and 2 Web Frontend (WFE).

Note: If you want to have a high availability cache cluster then you need at least 3 cache servers. Ref: https://msdn.microsoft.com/en-us/library/ee790974(v=azure.10).aspx

 

When installing SharePoint 2013 in the web farm, then SharePoint will configure a default cache cluster. To verify this, open a Windows PowerShell as Administrator on any of the web servers and execute the Use-CacheCluster command without parameters to set the context of your PowerShell session to the default cache cluster.

Then execute Get-CacheHost without parameters to list the host machines in the cache cluster.

 

Steps to configure AppFabric cache for Enterprise Portal. I did this on the CA server.

  1. Open a Windows PowerShell command prompt as an administrator.
  2. Execute the Use-CacheCluster command without parameters to set the context of your PowerShell session to the default cache cluster.
  3. Execute the New-Cache command to create a new named cache. Make a note of the name you specified. You will enter this cache name in the next procedure.
  4. SharePoint grants cache client access to the accounts in the groups WSS_ADMIN_WPG and WSS_WPG, so you don’t need to execute the Grant-CacheAllowedClientAccount command and specify the .NET Business Connector proxy (the account that is used by the Enterprise Portal application pool).
  5. Export the configuration with this command: Export-CacheClusterConfig and specify a name for the file.
  6. Open the file that you just created and add the following configuration to the <advancedProperties> section:
    <transportProperties maxBufferSize=”1000000000″ />

  7. Execute the Stop-CacheCluster command to stop the cache.
  8. Import the configuration with this command: Import-CacheClusterConfig and specify the configuration file you just canged.
  9. Execute the Start-CacheCluster command to start the cache.

 

Next: Install EP in the web farm using host header, see https://blogs.msdn.microsoft.com/axsupport/2015/11/09/how-to-install-ax-2012-enterprise-portal-in-a-multi-server-web-farm/

 

After EP has been installed in the web farm, then continue with configuration of the AppFabric cache on the WFE’s.

If the CA server should not be acting as WFE, then stop the web application service on the CA server (SharePoint Central Administration > System Settings > Manage services on this server).

 

On each of the WFE’s (cache clients) do the following:

  1. In Windows explorer, open the C:inetpubwwwrootwssVirtualDirectories<EPsite> folder. Ex: C:inetpubwwwrootwssVirtualDirectoriesEP.contoso.com80
    Locate the web.config file and create a backup of this file in a different location.
  2. Open the web.config file in e.g. Notepad.
  3. Locate the <configSections>. Add the following section tag before the <sectionGroup name=”Microsoft.Dynamics”> tag:

    <section name=”dataCacheClient” type=”Microsoft.ApplicationServer.Caching.DataCacheClientSection, Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ allowLocation=”true” allowDefinition=”Everywhere” />

    If these tags does not already exist in the web.config file, then you need to add it:

    <sectionGroup name=”Microsoft.Dynamics”>
    <section name=”Session” type=”Microsoft.Dynamics.Framework.BusinessConnector.Configuration.SessionConfigurationSection, Microsoft.Dynamics.Framework.BusinessConnector, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />
    <section name=”ServerState” type=”Microsoft.Dynamics.Framework.Portal.Configuration.ServerStateConfigurationSection, Microsoft.Dynamics.Framework.Portal, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />
    <section name=”AppFabricCaching” type=”Microsoft.Dynamics.Framework.Portal.Configuration.AppFabricConfigurationSection, Microsoft.Dynamics.Framework.Portal, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />
    </sectionGroup>

    Note: if you are running AX 2012 R2, then the version numbers in the above sections must be 6.2.0.0

  4. Add the following dataCacheClient tag to the web.config file after the </configSections>. Replace each instance of “Host_server_name” with the name of a cache server. Replace “default” with the name specified when you executed the New-Cache command.

    <dataCacheClient>
    <localCache isEnabled=”false” />
    <hosts>
    <!–List of hosts –>
    <host name=” Host_server_name1″ cachePort=”22233″ />
    <host name=” Host_server_name2″ cachePort=”22233″ />
    <host name=” Host_server_name3″ cachePort=”22233″ />
    </hosts>
    </dataCacheClient>
    <Microsoft.Dynamics>
    <ServerState Enabled=”true” />
    <AppFabricCaching CacheName=”default” />
    </Microsoft.Dynamics>

    Note:
    If the AppFabric Caching Service account (Control Panel > System and Security > Administrative Tools > Services) is running under a domain account then you need to add dataCacheServiceAccountType=”DomainAccount” to the dataCacheClient tag, ref: http://blogs.msdn.com/b/distributedservices/archive/2012/10/29/authenticationexception-in-appfabric-1-1-caching-for-windows-server.aspx

    Example:

 

Use the following procedure to verify that the AppFabric cache stores Enterprise Portal session on the server:

  1. On all the AppFabric servers, verify in the Windows Services console that AppFabric Caching Service is running.
  2. Open a Windows PowerShell command prompt as an administrator.
  3. Execute the Get-CacheStatistics command and specify the name used for the EP cache. The results should display all zeros.
  4. Open Enterprise Portal and open some edit pages.
  5. Execute the Get-CacheStatistics default command again and specify the name used for the EP cache. Verify that the cache displays values. This indicates that cache distribution is working.

 

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址