Book Image

Microsoft Windows Server AppFabric Cookbook

Book Image

Microsoft Windows Server AppFabric Cookbook

Overview of 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 within an exciting new middleware paradigm which brings performance, 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 most from WCF and WF services using Windows Server AppFabric leveraging the capabilities for building composite solutions on the .NET platform. Packed with over 60 task-based and immediately reusable recipes, 'Microsoft Windows Server AppFabric Cookbook' starts by showing you how to set up your development environment to start using Windows Server AppFabric quickly. The book then moves on to provide comprehensive coverage of the most important capabilities provided by Windows Server AppFabric, diving right in to hands-on topics such as 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 covering a full spectrum of complexity from simple to intermediate and advanced.
Table of Contents (16 chapters)
Microsoft Windows Server AppFabric Cookbook
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface

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 ideal. Furthermore, this lack of auto-start for caching services is problematic because even when the host is backed up its caching services are not available to the cluster. In this recipe, we will learn about two possible workarounds that will allow caching services to be available after a host has been rebooted.

How to do it...

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

  1. 1. Set the AppFabric Caching Service's Startup type to be Automatic, as shown in the following screenshot:

    Note

    To get to AppFabric Caching Service Properties launch services.msc (available under Start | Control Panel | Administrative Tools), select AppFarbric Caching Service, and then click on Action followed by the Properties menu item.

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

Note

For more details on how to configure a startup task in Windows 7, visit: http://windows.microsoft.com/en-US/windows7/schedule-a-task.

How it works...

Every time a Cache Host is rebooted, by 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 start automatically, we worked around the limitation, but it is important 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 under certain conditions, waiting for the service to start can result in significantly longer boot times (sometimes several minutes).

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

As we discussed, another option is to schedule a startup task which is a better approach as it still uses the same Windows Server AppFabric PowerShell cmdlets including Use-CacheCluster and Start-CacheHost, and you can define the trigger most appropriate to your environment for executing the start up task.

Note

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