banner



How To Install Appfabric On Windows Server 2012 R2

Most this book

Windows Server AppFabric provides a set of integrated capabilities that extend IIS and the Windows Server platform making it easier to build, scale and manage composite applications today. Windows Server AppFabric delivers the first wave of innovation inside an exciting new middleware epitome which brings functioning, scalability and enhanced management capabilities to the platform for applications built on the .NET Framework using Windows Communication Foundation and Windows Workflow Foundation.

'Microsoft Windows Server AppFabric Cookbook' shows you how to get the about from WCF and WF services using Windows Server AppFabric leveraging the capabilities for building blended solutions on the .NET platform.

Packed with over threescore task-based and immediately reusable recipes, 'Microsoft Windows Server AppFabric Cookbook' starts by showing yous how to gear up your evolution environment to showtime using Windows Server AppFabric apace. The volume then moves on to provide comprehensive coverage of the well-nigh important capabilities provided past Windows Server AppFabric, diving right in to hands-on topics such every bit deploying WCF and WF applications to Windows Server AppFabric and leveraging the distributed caching, scalable hosting, persistence, monitoring and management capabilities that Windows Server AppFabric has to offer, with recipes roofing a full spectrum of complexity from elementary to intermediate and avant-garde.

Publication date:
July 2022

Publisher
Packt

Pages
428

ISBN
9781849684187


Affiliate 1. Installing Windows Server AppFabric

In this affiliate, we will cover:

  • Installing Windows Server AppFabric

  • Configuring Windows Server AppFabric (hosting and monitoring)

  • Configuring Windows Server AppFabric (caching)

  • Installing caching Customer Assemblies

  • Changing the Windows Server AppFabric configuration afterward installation

  • Starting a Caching service

  • Troubleshooting Windows Server AppFabric configuration errors

  • Troubleshooting Windows Server AppFabric auto restart issues

Introduction

Windows Server AppFabric is an extension of the Application server office on the Microsoft Platform. Windows Server AppFabric offers in-retentivity, super-fast, scalable caching capabilities for web applications and services. For applications built using Windows Communication Foundation (WCF) and Workflow Foundation (WF), Windows Server AppFabric provides streamlined hosting and monitoring capabilities that support composition scenarios.

Windows Server AppFabric is built on height of an existing set of technologies on the Windows platform including, but not limited to Net Information Services (IIS), Windows Procedure Activation Service (WAS), .NET Framework v four.0, and Event Tracing for Windows (ETW).

In this chapter, we will expect at how to set up up Windows Server AppFabric using the dissimilar configuration options. We will also see how the configuration of Windows Server AppFabric can exist inverse after the installation. Lastly, at the finish of the chapter, we will run into how to troubleshoot some common problems with Windows Server AppFabric installations.

Introduction


Windows Server AppFabric is an extension of the Application server part on the Microsoft Platform. Windows Server AppFabric offers in-memory, super-fast, scalable caching capabilities for web applications and services. For applications congenital using Windows Communication Foundation (WCF) and Workflow Foundation (WF), Windows Server AppFabric provides streamlined hosting and monitoring capabilities that support composition scenarios.

Windows Server AppFabric is built on top of an existing set of technologies on the Windows platform including, merely non limited to Cyberspace Information Services (IIS), Windows Procedure Activation Service (WAS), .NET Framework v 4.0, and Effect Tracing for Windows (ETW).

In this affiliate, we volition expect at how to set up Windows Server AppFabric using the different configuration options. We will also come across how the configuration of Windows Server AppFabric can be changed after the installation. Lastly, at the end of the chapter, nosotros volition encounter how to troubleshoot some common problems with Windows Server AppFabric installations.

Installing Windows Server AppFabric


Windows Server AppFabric is an extension of the Application Server role on the Windows platform. At the time of this writing there are two ways to install Windows Server AppFabric. One is the standard direct install and the other is using Microsoft'due south new and exciting Web Platform Installer (WPI).

In this recipe, we volition go through the step-by-step instructions to install Windows Server AppFabric using WPI. Needless to say, if you already have Windows Server AppFabric installed on your car, then you tin skip this recipe.

Note

WPI is the preferred approach because it streamlines the installation procedure by smartly identifying and installing the prerequisite software.

Getting set

Windows Server AppFabric tin can exist installed on Windows 7, Windows Server 2008 SP two, Windows Vista R2, and Windows Server 2008 R2 (it supports both 32 and 64 scrap architectures). You will likewise demand Microsoft .NET Framework v4, IIS7, and Windows PowerShell ii.0. In terms of hardware, officially, any 1GHz+ CPU (900MHz+ for Dual Core and 700MHz+ for Quad Core) with 2 GB of RAM volition exist sufficient to get up and running with Windows Server AppFabric. Even so, it is recommended that you have at least 4 GB of RAM to run Windows Server AppFabric.

Note

If you want to endeavour Windows Server AppFabric before actually installing it on your host car, information technology makes sense to use a virtual car that has Windows Server AppFabric installed on it so that you can play with it. The expert news is that Microsoft has made a preconfigured Windows Server AppFabric VM bachelor on MSDN that can be downloaded and used with Microsoft's Virtual PC. This download is available every bit a part of Microsoft'south training kit for Windows Server AppFabric. The download is available at: http://www.microsoft.com/download/en/details.aspx?id=7956.

How to practise it...

WPI offers a highly streamlined packet/software download installation mechanism. You lot tin can get WPI from Microsoft's website at: http://www.microsoft.com/web/downloads/platform.aspx. Afterwards downloading and installing WPI, you lot can use the post-obit steps to launch Windows Server AppFabric Installer:

  1. 1. Under the Start carte, go to All Programs . If y'all are using Windows vii, type Web Platform Installer in the custom card detail, find the WPI as shown in the following screenshot, and launch it:

  2. 2. Accept thursdayeastward User Account Control (UAC) alarm. This will permit WPI to make changes to your figurer.

  3. 3. Click on Next at the lesser of the screen to go started with the WPI.

  4. 4. Type AppFabric in the search box (in the peak right-manus corner of the screen) and press the Enter fundamental:

  5. 5. This will reveal a search outcome showing Windows Server AppFabric . Click on Add together and then on Install to continue:

  6. six. Now, WPI will ask to review the download and install of all the required software components to run Windows Server AppFabric. Select I Accept to continue.

    Annotation

    The listing of components, 3rd-political party application software, and Microsoft products volition vary from machine to motorcar. WPI will make up one's mind the missing software and will listing it on this screen.

  7. 7. Once you select I Accept , WPI will download and install all the required software components one by ane. Sometimes this may result in multiple reboots for the host machine.

  8. viii. Once all the required software components are installed, the Windows Server AppFabric installation will exist complete. Click on Finish:

How information technology works...

The Windows Server AppFabric installation adds three new Windows services: AppFabric Caching Service, AppFabric Outcome Collection Service , and AppFabric Workflow Management Service , for caching, monitoring, and hosting scenarios respectively. These services can be seen when the Services Snap-in is launched from the Command Panel (or by typing Services.msc in the search box under the Windows Start carte).

Equally nosotros can see in the preceding screenshot, but AppFabric Event Drove Service and AppFabric Workflow Management Service have Status as Started and have Startup Type defined equally Automatic . By default, Windows Server AppFabric Caching Service is not available for utilise after a auto reboot.

Note

AppFabric Upshot Collection Service, AppFabric Workflow Management Service , and Windows Server AppFabric Caching Service form the heart of Windows Server AppFabric. These services work in the background and perform tasks such as collecting events, managing the workflow'south life bicycle, connecting to the cache cluster, and serving cache related requests.

Once Windows Server AppFabric is installed, the adjacent step is to configure it using the Windows Server AppFabric Configuration wizard.

Configuring Windows Server AppFabric (hosting and monitoring)


There are a number of configuration options available when configuring Windows Server AppFabric, and in this recipe we will go through them. At this point, we should appreciate Microsoft's efforts in designing Windows Server AppFabric, equally it allows a fair bit of customization.

Getting ready

Configuring Windows Server AppFabric is available via the Windows Server AppFabric Configuration wizard. It is a fairly simple task, simply it requires careful consideration of a number of options and possibilities. We will demand the following items set in club to configure Windows Server AppFabric:

  • Service accounts to run (with administrative privileges)

    • AppFabric Hosting'south Event Collection service

    • AppFabric Hosting's Persistence service

  • SQL server database for:

    • (SQL server based) monitoring provider

    • (SQL server based) persistence provider

    • AppFabric caching store service provider (if your machine is function of a domain)

  • UNC file share for Windows Server AppFabric Caching service configuration provider (if the host machine is running in a workstation manner)

  • Information on cluster prepare up (for a high-availability scenario)

    Notation

    When HA (Loftier Availability) is enabled Windows Server AppFabric Enshroud stores a copy of each cached object or region in a separate enshroud host. HA is discussed in particular in Chapter seven, Monitoring Windows Server AppFabric Deployment.

  • Unique port numbers for cache, cluster, arbitration, and replication

    Note

    It should exist noted that when yous run the Windows Server AppFabric Configuration wizard and brand changes to the configuration, it will overwrite any existing values.

How to do it...

To launch the Window Servers AppFabric Configuration wizard, get to All programs under the Start menu, discover AppFabric , and then select Configure AppFabric .

The following is a sequence of steps that volition accept you through the configuration wizard for Windows Server AppFabric:

  1. ane. Run the Configure AppFabric wizard.

  2. ii. Accept the User Business relationship Control (UAC) dialog, confirming that you will allow this program to make changes to your host machine:

  3. 3. Click on Adjacent at the bottom of the screen to showtime the configuration of Windows Server AppFabric.

  4. four. Once you lot are at the Configure Hosting Services screen, select the box titled Prepare monitoring configuration:

  5. 5. Select the service business relationship required to run the AppFabric Upshot Drove service by clicking on Change .

  6. 6. If you do not have a gear up-made account available for the consequence drove service, then you can leave the default value of NT Authority\Local Service , (every bit this can be modified after on). For more details on security, please refer to the How it works... department, as well as Chapter 9, Configuring Windows Server AppFabric Security.

  7. vii. Now select the Monitoring provider , as this will provide access to the monitoring database. (Equally there is only one default SQL-based implementation, select the Arrangement.Data.SqlClient option.)

    Note

    Windows Server AppFabric past design allows adding multiple providers for monitoring and persistence. Configuring multiple persistence providers is discussed in Chapter 5, More Windows Server AppFabric Hosting Features.

  8. 8. Now click on Configure to launch the SQL configuration screen to assistance yous select/configure the SQL server example that will exist used to store monitoring information.

  9. ix. Select Register AppFabric monitoring store in root web.config .

  10. 10. Select Initialize monitoring store .

  11. 11. Under Connection String , provide the SQL Server name, for example,<HostServerName>\<SQLInstanceName>.

  12. 12. Provide the Database name for the SQL Server.

    Note

    The SQL database (specified higher up in steps 11 and 12) is used to shop Windows Server AppFabric monitoring related information. The Initialize monitoring store pick will initialize the database with the monitoring schema.

  13. 13. The offset half of your configuration screen should announced equally follows:

  14. 14. At present we volition ready the Security Configuration to access the SQL Server database instance that nosotros selected/created previously. For Windows authentication , if you lot accept selected a complete install, then you lot will see default values for Administrators, Readers, and Writers in Security Configuration . If you lot already accept roles defined and you have opted to initialize the Monitoring Database , and then you lot can browse and select the appropriate roles. Otherwise, use the default values of AS_Administrators and AS_Observers every bit Administrators/Writers and Readers respectively. This is shown in the following screenshot:

    Annotation

    Windows Server AppFabric's AS_Administrators is a conceptual and authoritative part. As the name implies it allows full control over AppFabric's configuration, monitoring, and persistence capabilities. Upshot Collection and Workflow Persistence services run under this function.

    Likewise, AS_Observer is also a conceptual and administrative role. Information technology allows y'all to view the application and services configuration, monitor information, as well as view persisted instances, all without being able to change anything.

  15. xv. However, if you wish to choose SQL Server Authentication , you will need to provide a username and password that will be used to connect to SQL Server database. In this recipe we will only use Windows hallmark .

  16. 16. Once you click on OK yous should see a confirmation dialog asking you to validate whether you desire these settings to have issue:

  17. 17. Click on Aye , and the wizard will go ahead and create and initialize the monitoring store. Once completed, yous should see a validation dialog advising you that the Monitoring store was initialized and registered successfully:

  18. 18. On the Configure Hosting Services screen, select Ready persistence configuration .

  19. 19. At present, select an AppFabric Workflow Direction service account . Only similar the service account for monitoring, we will need a service account that has admin rights and can admission the persistence provider/shop. If you lot have an account already available for this and so click on Change and select it. Otherwise, use the default value of the NT Authority\LOCAL SERVICE account:

  20. twenty. From the Persistence provider dropdown, select a sqlStoreProvider and so click on Configure . At present this screen should look familiar, as information technology is the same one nosotros used to set up Windows Server AppFabric Monitoring earlier on. We volition once once again select Register AppFabric persistence store in root web.config . We volition likewise select Initialize persistence store and provide the SQL Server and Database names:

  21. 21. Just similar we gear up the Security Configuration for the Windows Server AppFabric Monitoring database, repeat the same steps and use built-in accounts for the persistence database.

  22. 22. Click on OK and keep to confirm the changes. This will complete the configuration of the Hosting and Monitoring parts of Windows Server AppFabric.

How information technology works...

The configuration of Windows Server AppFabric provides contextual data to run Windows Server AppFabric services that are responsible for monitoring and hosting services. The values that we configured tin be changed later, either by running the AppFabric Configuration sorcerer once again or by using Windows Server AppFabric PowerShell commandlets (Cmdlets).

Note

Windows PowerShell is congenital on meridian of Microsoft.Net and offers a chore based control-line crush and scripting linguistic communication. Windows PowerShell has built in commands called Cmdlets (pronounced as commandlets). Cmdlets are lightweight commands and typically return a Microsoft.NET Framework object type to the next command in the pipeline.

It should be noted that monitoring and persistence services should be run under accounts with administrative privileges so that they can read and persist events to the preconfigured monitoring and persistence databases.

Configuring Windows Server AppFabric (caching)


Once y'all accept finished configuring the Hosting Services as discussed in the preceding recipe, the next job is to configure the Caching Services for AppFabric. Just similar in the preceding recipe, we volition select a service account that should be part of the administrator group so that it has an administrative access to the caching configuration provider. In one case once more nosotros will consider a workstation configuration and select a valid local system account.

We will run into how to setup the Caching Configuration Store Provider . At the end of this recipe, we will also see how to join/create a new enshroud cluster (that this, the case of Window Server AppFabric Cache is role of) along with the stop point details (that is, port addresses) used by AppFabric services to communicate on the network.

Once we accept configured Windows Server AppFabric Caching Services, nosotros volition be able to starting time using AppFabric Caching.

Getting gear up

To begin this recipe, we will need the following in place:

  • A service account for the AppFabric Caching service.

  • A file share (UNC Server Share) to store XML based cache configurations or a SQL Server database for a SQL Server based AppFabric Configuration store. (This is required for configuring a High Availability Caching Service scenario that runs on Windows Server 2008.)

How to do it...

To gear up up Windows Server AppFabric Caching follow these steps:

  1. 1. Run the AppFabric Configuration wizard.

  2. 2. Accept the User Account Control (UAC) dialog, confirming that you will let this program to make changes to your calculator.

  3. iii. Click on Side by side on the Before yous Begin and Configure Hosting Services screens to reach Configure Caching Service .

    Note

    Y'all cannot directly select Caching Service Configuration from the left-manus navigation console on the Windows Server AppFabric Configuration Wizard .

  4. four. Once you are on the Caching Service screen of the Configure AppFabric wizard, select the Set Caching Service configuration .

  5. 5. Under Caching Service Account , click on Change . This will allow you to select the identity for the Caching Service Account .

  6. 6. If your machine is in workstation fashion, then y'all cannot change the service business relationship. Otherwise, you can browse and select a local account (that has administrative access to the Caching Configuration store).

  7. 7. Select XML from the Caching Service configuration provider dropdown.

  8. 8. The SQL Server based configuration is not available for the Caching Configuration Service in workstation mode. If yous select SQL provider and click on Configure , yous volition get the following mistake message:

    Note

    We talk over the use of SQL Server AppFabric Caching Service Configuration Store Provider in more than detail in Affiliate seven, Monitoring Windows Server AppFabric Deployment.

  9. ix. Under File Share , provide a file path of an existing UNC file share. This volition let Windows Server AppFabric's Configuration Service to store and manage information stored every bit an XML file under this provided path. Your screen will appear equally follows:

  10. 10. It should be noted that the File share (UNC server share) selection magician will not permit you to create a new file share. As highlighted in the beginning of the recipe, it is required to take a UNC file share readily available. Nether cluster information select New Cluster and click on Adjacent .

  11. 11. Configure AppFabric Cache Node by providing a unique port number value (numbers must exist between 1024 and 65535) for the Enshroud port, Cluster port, Arbitration port , and Replication port .

    Annotation

    The Cache port is used for transmitting data between Cache Clients and Cache Hosts. The Cluster port enables Cache Cluster formation and Direction. The Arbitration port is used to double check if the Enshroud Host is unavailable. Mediation is used when the Cache Host fails. The Replication Host is used to move data between the Cache Hosts. Replication is used when Cache is configured for High Availability.

  12. 12. Configure Windows firewall exceptions by selecting the rules for Windows Server AppFabric Caching Service and Remote Service Management . Your screen should appear similar to the following:

    Note

    If you lot are using any third-party (non-Microsoft) firewall then you will need to manually update the firewall rules. This must be done to allow Windows Server AppFabric to use the ports that were specified during its configuration.

  13. 13. After clicking on Adjacent , click on Yes on the Windows Server AppFabric Configuration Wizard dialog box and y'all will come to the cease of the wizard with an option to launch IIS to further manage Windows Server AppFabric. Click on Finish to shut the wizard.

  14. xiv. Congratulations! You have fully configured Windows Server AppFabric. Click on Stop .

Note

The High Availability feature of Windows Server AppFabric Caching can only be enabled on Enterprise versions of Windows Server 2008/2008 R2. This implies that all the nodes in the cluster must have enterprise editions of Windows Server 2008/2008 R2. For more information yous may refer to: http://go.microsoft.com/fwlink/?LinkId=164929.

How it works...

The Windows Server AppFabric Caching Service requires a service account to run its Windows service equally well as a configuration provider where it can shop its configuration. Equally the caching service runs under the identity of the provided account, the account must accept administrative privileges so that it tin admission and modify the configuration.

The Windows Server AppFabric Caching Service needs to identify which ports to connect to in order to communicate with the other hosts in the cluster. In one case the port numbers are specified, ensure that whatever software or hardware firewalls are not blocking these ports.

As we experienced in this recipe, the Windows Server AppFabric Caching Service is highly configurable and the configuration wizard makes it extremely easy to set (or modify) the existing configuration.

Now that we take configured Services for AppFabric and all the services are up and running under valid service accounts along with firewall rule definitions, we can now start coding to test and starting time consuming the caching service.

Installing Cache Client Assemblies


For non-production/client environments, nosotros do not demand to install the complete Windows Server AppFabric. Instead, we can apply Client Assemblies to connect to an case of AppFabric. In this recipe, nosotros volition come across how to ready a Customer Machine that can connect to and communicate with Windows Server AppFabric. One time we have set up the Client Assemblies, then we can use Visual Studio, for example, to write applications that can use Windows Server AppFabric Caching capabilities.

Note

Cache Client, equally the name implies, refers to the applications or services that tin can access and alter cached items by connecting to a configured or specified enshroud cluster.

Getting ready

To prepare upwards the Cache Client, you will demand the post-obit assemblies:

  • Microsoft.ApplicationServer.Caching.Core.dll

  • Microsoft.ApplicationServer.Caching.Customer.dll

  • Microsoft.WindowsFabric.Mutual.dll

  • Microsoft.WindowsFabric.Data.Common.dll

Annotation

For the Windows Server AppFabric Caching Client to exist able connect to the Windows Server AppFabric Caching Service, it is required that Client Binaries are of the aforementioned version number equally that of the Enshroud Service.

How to do it...

Setting up the Client Caching environment is a very simple task; it is just a matter of copying the binaries highlighted at the kickoff of the recipe to a particular location. These binaries can be obtained by installing Windows Server AppFabric on a workstation. You will need the Caching feature installation to get the required Caching binaries. The default location for these assemblies is .\Windows\System32\AppFabric:

  1. one. On Windows 7, type C:\Windows\System32\AppFabric in the custom card; you should be able to see a number of binaries and the configuration file:

  2. 2. Obtain the following assemblies from the Windows Server AppFabric Cache installation:

    • Microsoft.ApplicationServer.Caching.Core.dll

    • Microsoft.ApplicationServer.Caching.Client.dll

    • Microsoft.WindowsFabric.Common.dll

    • Microsoft.WindowsFabric.Information.Common.dll

  3. 3. Copy the assemblies mentioned in step 2 to a identify where they are available under a known path to your Client application.

Notation

To cache-enable an awarding server, you will need to install the Windows Server AppFabric Caching Assemblies on it. It is equally unproblematic as having an application/service installed on the server along with the AppFabric Caching assemblies. As long as your application installation copies the AppFabric Enshroud Assemblies and has a valid configuration in place, your awarding server is Cache enabled.

How it works...

The Windows Server AppFabric Caching Customer application requires an API to talk to the Caching Service. This API (provided as a fix of assemblies highlighted before in this recipe) must exist available for the customer to program against it. Past copying these assemblies on the customer machine, we ensure that the client does not need to do a complete installation of Windows Server AppFabric.

One time the Client Assemblies are available, nosotros can write applications that can employ AppFabric'south Caching capabilities and connect to the AppFabric Caching cluster.

Changing the Windows Server AppFabric configuration afterward installation


One time Windows Server AppFabric is configured, information technology is still possible to change its configuration.

In that location could be a number of reasons for changing the configuration of an existing deployment. The following are some of the most mutual scenarios that would require such changes:

  • Changes database repository (SQL example for example)

  • Changes to system accounts (for security reasons)

  • Port number related changes for caching.

You can use the Windows Server AppFabric configuration magician and brand the required changes as they are required. In this recipe, we volition come across how to re-configure Windows Server AppFabric afterward installation.

Getting gear up

You lot will need an existing example of AppFabric that has been installed and configured to go started with this recipe. In this recipe, we will learn how to modify Windows Server AppFabric configuration subsequently it has been installed on the host OS.

How to do information technology...

To begin, launch the AppFabric Configuration magician to go through the configuration options on an existing installation of AppFabric to easily select the options that nosotros want to change.

  1. 1. Commencement the Window Server AppFabric Configuration wizard.

  2. 2. Take the User Account Control (UAC) alarm. Click on Next at the lesser of the screen to get started with the configuration.

  3. 3. Give the sorcerer a few seconds while it loads the existing configuration. The screen should look as follows:

    Note

    Once the configuration is loaded, you lot will notice that the green tick nether the monitoring and persistence configurations states that the default monitoring store is registered.

  4. 4. Nosotros can now go ahead and modify the monitoring configuration past selecting Gear up monitoring configuration and clicking on Change .

  5. 5. This will launch a Windows Server AppFabric Monitoring Store Configuration wizard that we have already used in the recipe Configuring Windows Server AppFabric (hosting and monitoring) earlier in this chapter.

  6. half dozen. By selecting Register AppFabric monitoring store in root spider web.config , we can specify the Server and Database proper name.

    Note

    Registering the monitoring or persistence store in the configuration implies that that the connection string (with the name = ApplicationServerMonitoringConnectionString) is placed in the root Web.Config file and is made available to all subsequent websites.

    Note

    The Initialize monitoring store option will create a new database (if it does non already exist) and it volition also initialize the schema and the construction of the database (based on the Microsoft SQL Server provider for the AppFabric monitoring site) .

    It should as well be noted that if y'all skip the Annals AppFabric monitoring store in root web.config option, then the monitoring database will not be available on this computer.

  7. 7. We can repeat steps iv, five, and 6 by selecting Set up persistence configuration .

  8. viii. Adjacent move to Caching Service and select Set Caching Service configuration , every bit shown in the following screenshot:

  9. nine. Change the Caching Service account past selecting Change and opting for a relevant business relationship.

  10. 10. Alter the File share (UNC server share) by browsing and selecting the appropriate share that we desire to shop the XML configuration file.

  11. 11. Join an existing cluster (as opposed to creating a new one) by selecting the Join cluster pick, as shown in the post-obit screenshot:

    Note

    If the configuration already exists, then this caching service instance will go office of an existing cluster.

  12. 12. If you are joining an existing cluster, y'all will not be able to change the cluster size.

    Note

    It should be noted that the cluster size does not dictate the possible number of machines in the cluster; nevertheless, it does optimize the whole cluster based on the size selected. So for case, you can add together seven machines to a cluster that is divers as "Small" (one-5 machines). However, Windows Server AppFabric will optimize the caching configuration based on cluster configuration of i-5 machines.

  13. thirteen. To change port numbers for caching, click on Adjacent and change the values as required.

    Note

    In case of changing port numbers you must ensure that firewall level exceptions accept already been defined for the newly selected port numbers. Otherwise, Windows Server AppFabric Enshroud will not be able to function properly.

How it works...

One of the all-time things about Windows Server AppFabric is that it is highly configurable. Configuration can be inverse in a multifariousness of ways. For example, in this recipe our changes were driven past the Windows Server AppFabric configuration wizard; even so, we could have achieved similar results using AppFabric PowerShell commandlets. We will acquire more about PowerShell commandlets in the following capacity.

Another possible way to change configuration is to modify the configuration manually. For example, when using the XML provider, we tin can e'er go to the file share and modify the ClusterConfig.xml file.

Windows Server AppFabric uses providers to abstruse the implementation details of its Enshroud configuration likewise equally persistence and monitoring stores. In this recipe we used out of the box providers, but configuration storage and management can be further extended to implement a custom provider.

At runtime, Windows Server AppFabric looks up the registered configuration provider. Based on the provider it so accesses a specific configuration store. The configuration store is and so used to fetch relevant information for that provider. For case, with the Caching configuration provider, the configuration store will store information such every bit port numbers, service accounts, and so on. Similarly, for the persistence and monitoring configuration providers, the configuration shop will maintain information relevant to monitoring and persistence stores such every bit connexion strings, for example.

Starting a Caching service


Windows PowerShell plays an extremely important role in the overall management of Windows Server AppFabric. There are hundreds of cmdlets and functions available that allow administrators (and developers alike) to perform day-to-24-hour interval management tasks on AppFabric. Every bit Caching is 1 of the biggest features in Windows Server AppFabric, it is no surprise that AppFabric Caching has a dedicated ready of PowerShell cmdlets that allow developers and administrators to interact with the distributed Cache environments in an interactive and streamlined manner.

In this recipe, we volition expect at how to use PowerShell cmdlets to interact with the AppFabric Caching service.

Note

There are two means that you lot tin configure your Windows Server AppFabric installation/environs. Ane option is to use the Windows Server AppFabric Configuration wizard (that we have extensively used in this chapter) and another option is to employ the Windows Server AppFabric PowerShell cmdlets. Using PowerShell to manage AppFabric Caching introduces a number of useful possibilities, including merely not limited to automating build and deployment scenarios, and enabling command line monitoring and troubleshooting.

Getting gear up

Assuming that you lot have the Windows Server AppFabric assistants feature installed, y'all can launch the AppFabric PowerShell console via Administrative tools (available nether Get-go | Command Panel | Administrative Tools) or by going to the Windows Server AppFabric folder under Program Files and selecting Caching Administration Windows PowerShell:

Note

On Windows vii and Windows Server 2008, you must run Caching Assistants Windows PowerShell with administrative privileges, otherwise some commands will not work.

How to do it...

After starting theastward Caching Administration Windows Powershell console with authoritative privileges, we can start our Enshroud Cluster for the first time:

  1. 1. To set the context of the Windows PowerShell session, we will execute the employ-CacheCluster command first.

    Note

    The Use-CacheCluster control sets the context for Windows PowerShell. Considering that this is beingness executed on the host calculator, we do not need to provide the configuration, every bit the parameters are extracted from the local estimator.

  2. 2. In one case the context has been set, we will execute the first-CacheCluster command. This should issue in a condition that shows that the Caching Service is up and running:

    Annotation

    The Start-CacheCluster commandlet starts the caching service on all the servers that are function of the cluster with the lead hosts starting before non-lead hosts.

  3. 3. Once the Caching Service is up and running, we tin query it for the caches that are bachelor in this cluster by using the Get-Cache command.

    Note

    This shows that the cluster is upward and running and there is a default cache case running on the cluster.

How it works...

The Caching Administration PowerShell commandlets give us complete control for managing an AppFabric Cache Cluster. When starting PowerShell sessions and running on a non-host computer, yous must provide the -Provider (xml or Organization.Data.SqlClient) and ConnectionString (file path for XML or connection cord for database).

Annotation that Cache services do non automatically beginning afterward a organization reboot, so the Start-CacheCluster command must exist invoked. We can also employ the Start-CacheHost control with HostName and Port parameters to start a particular host in the cluster.

We will come across much more on each of these PowerShell commands in the following chapters of this book.

Troubleshooting Windows Server AppFabric — configuration errors


It is not likewise uncommon to come up beyond errors while installing and configuring Windows Server AppFabric. As long as we know where something wrong, most installation related errors are fairly fiddling to prepare.

In this recipe we will troubleshoot some mutual Windows Server AppFabric installation and configuration errors.

How to practice it...

The first thing to do is to find the log file under the %temp% binder and then search for errors. In one case error(s) are found, we can expect up in MSDN for the fault details too as their corresponding resolutions.

  1. one. To find installation related errors, observe a log file created by the AppFabric installer available in the %temp% folder with the file proper noun: AppServerSetup(yyyy-MM-dd H-mm-ss).log.

  2. 2. These errors can either be viewed by clicking on the link in the last folio of the installation wizard by or past browsing to the file and then opening it with Notepad (or your favorite text editor).

  3. 3. Search for errors in the text file. Note the error codes and look upward their reasons and associated workarounds at this URL: http://msdn.microsoft.com/en-united states/library/aa368542(VS.85).aspx.

    Note

    When using an automated installer, log file options tin be provided by using /logfile or /50 switch and specifying the file path where the log file should be placed.

  4. 4. Likewise, for configuration errors, notice a file under the %temp% folder with the proper noun: Microsoft.ApplicationServer.Configuration (yyyy-MM-dd H-mm-ss) <process lawmaking>.log.

  5. 5. Errors mentioned in the configuration log can be looked up for details forth with possible remediation at: http://msdn.microsoft.com/en-us/library/ms681381(five=VS.85).aspx.

Note

Configuration errors are AppFabric specific just descriptive enough to indicate you lot in the correct direction; providing information that allow'south yous know the issue is related to network resources, firewalls, and then on. Information technology is too worth noting that you can see all PowerShell commands that are executed by the sorcerer logged in this file as well.

How it works...

Windows Server AppFabric uses a very detailed logging mechanism, and writes log entries for configuration and installation related errors in separate physical log files available under the %temp% folder.

Troubleshooting configuration errors revolves effectually going to a relevant log file and finding the fault entries and then looking upwards each error on the corresponding MSDN assistance folio (equally highlighted in the How to do it... section) to observe a solution for each issue reported.

For more information on error codes please visit the following MSDN links:

  • http://msdn.microsoft.com/en-us/library/ms681381(v=VS.85).aspx

  • http://msdn.microsoft.com/en-united states/library/aa368542(VS.85).aspx

Troubleshooting Windows Server AppFabric — auto restart issues


When a cache host is rebooted, Windows Server AppFabric does not start the caching services by default. Although services can always be started manually using the PowerShell commandlets, this intervention is far from platonic. Furthermore, this lack of machine-start for caching services is problematic considering even when the host is backed up its caching services are non available to the cluster. In this recipe, we will larn about two possible workarounds that volition allow caching services to be available later a host has been rebooted.

How to do it...

We will first set up the Startup blazon of the AppFabricCachingService to be automatic so that the Caching Service is started every time a cache host is rebooted:

  1. 1. Fix the AppFabric Caching Service's Startup type to be Automated , as shown in the post-obit screenshot:

    Notation

    To become to AppFabric Caching Service Properties launch services.msc (available under Showtime | Control Console | Administrative Tools) , select AppFarbric Caching Service , and then click on Action followed by the Properties carte du jour particular.

  2. 2. Another option is to schedule a startup chore to execute the Use-CacheCluster and Start-CacheHost commands.

How it works...

Every fourth dimension a Enshroud Host is rebooted, past default it is necessary to restart the AppFabric Caching Service manually. This is because Windows Server AppFabric Caching Services do not have a built-in mechanism for auto-start. By setting the service to get-go automatically, nosotros worked around the limitation, simply it is of import to note that doing so carries some important caveats.

The reason Microsoft chose to require a manual restart of the caching service by default is that nether certain atmospheric condition, waiting for the service to start can result in significantly longer kicking times (sometimes several minutes).

On development machines, it can be useful to configure the service to start automatically so that yous aren't pulling you hair out when caching all of a sudden stops working. Yet, if yous experience excessive kicking times, or errors resulting from applying this tip, it is probably best to skip information technology all together.

As nosotros discussed, another selection is to schedule a startup job which is a improve approach equally information technology still uses the aforementioned Windows Server AppFabric PowerShell cmdlets including Apply-CacheCluster and Beginning-CacheHost, and you can define the trigger about appropriate to your surround for executing the start upwardly task.

Note

It must be noted that these potential workarounds and not recommended past Microsoft.

About the Authors

  • Hammad Rajjoub

    Hammad works every bit an Architect Evangelist with Microsoft. Before joining Microsoft, Hammad was awarded Microsoft's Most Valuable Professional person award, seven years in a row. Along with being an MVP he was also Microsoft'southward Concern Platform Technology Counselor. Being an MVP in Connected Systems gave him early access to Windows Communication Foundation, Windows Workflow Foundation, besides as Windows Server AppFabric. In his previous roles he has been a CTO at a applied science startup, Vice President at 1 of largest financial institutions, as well equally a Solutions Builder at a leading consulting company. Hammad has over a decade of experience using Microsoft Technologies, specially .Internet since its beta i release. He is a published author and a frequent speaker at Technology conferences (including Tech Ed and Deject Calculating Asia). He has founded a number of developer and builder communities over the years and remains a passionate speaker and contributor at local technical communities in Singapore. He is also an active member of the International Association of Software Architects (IASA) - Singapore Chapter. His areas of involvement include Cloud Computing, Enterprise Architecture, Pattern Patterns and Quantum Ciphering. At home he is a decorated husband and father of twin girls and a baby boy. For more than details visit his website at http://world wide web.hammadrajjoub.net and his twitter account @hammadrajjoub.

    Browse publications past this author

  • Rick K. Garibay

    With over 12 years' experience delivering solutions on the Microsoft platform beyond industry sectors, Rick is a developer, architect, speaker and writer on distributed .NET technologies and is the General Manager of the Connected Systems Practice at Neudesic. Rick focuses on helping mid-market and big enterprise clients to transform their business organization past designing solutions that bulldoze transparency, differentiation and innovation by combining modern, iterative software applied science methodologies with the collective capabilities of the Microsoft Platform to help close the value gap. Rick specializes in distributed technologies such every bit Microsoft .Net, Windows Communication Foundation, Workflow Foundation, Windows Server AppFabric, and Windows Azure to deliver business value and drive revenue while reducing operational costs. Rick serves every bit a member of the Microsoft Application Platform Partner Advisory Council also as an advisor to Microsoft equally a long-time member of the Business Platform and Azure Technology Advisors group. Every bit a 5-time Microsoft Connected Systems MVP, Rick is an active speaker, writer and passionate community advocate in the national .NET community. Rick is the President and Co-Founder of the Phoenix Connected Systems User Group, jubilant 3 years in operation. Recent presentations include talks at the Microsoft SOA and Business Process Conference in Redmond, WA, Microsoft TechEd in New Orleans, LA, Desert Lawmaking Camp, and numerous Microsoft roadshow events throughout North America. Rick is a frequent contributor to manufacture publications such equally CODE Mag and maintains a technical blog focused on Microsoft distributed technologies at http://www.rickgaribay.net

    Scan publications by this author

Source: https://www.packtpub.com/product/microsoft-windows-server-appfabric-cookbook/9781849684187

Posted by: hamelunifelly.blogspot.com

0 Response to "How To Install Appfabric On Windows Server 2012 R2"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel