You are currently offline, waiting for your internet to reconnect

FIX: "System.InvalidOperationException: Category does not exist" error if some registry keys for the WCF-based SAP adapter are corrupted in BizTalk Adapter Pack

This article applies to the following product:
  • BizTalk Adapter Pack 2.0
  • BizTalk Adapter Pack 2010
SYMPTOMS
Consider the following scenario:
  • You use Microsoft Windows Communication Foundation (WCF)-based SAP adapter in Microsoft BizTalk Adapter Pack 2.0 or in Microsoft BizTalk Adapter Pack 2010 to send requests to an SAP system.

    Note The WCF-based SAP adapter is also known as Microsoft BizTalk Adapter for mySAP Business Suite 3.0.
  • Some registry keys of the WCF-based SAP adapter performance counters are corrupted.
In this scenario, you receive the following error message:
System.TypeInitializationException: The type initializer for 'Microsoft.Adapters.SAP.SapPerfCounters' threw an exception. ---> System.InvalidOperationException: Category does not exist.
at System.Diagnostics.PerformanceCounterLib.CounterExists(String machine, String category, String counter)
at System.Diagnostics.PerformanceCounterCategory.CounterExists(String counterName, String categoryName, String machineName)
at System.Diagnostics.PerformanceCounterCategory.CounterExists(String counterName, String categoryName)
at Microsoft.Adapters.SAP.SapPerfCounters..cctor()
CAUSE
This issue occurs because the WCF-based SAP adapter does not handle the InvalidOperationException exception.
RESOLUTION

Cumulative update information

For BizTalk Adapter Pack 2010

The hotfix that resolves this issue is included in cumulative update package 2 for BizTalk Adapter Pack 2010. For more information about how to obtain this cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:

2572999Cumulative update package 2 for BizTalk Adapter Pack 2010

BizTalk Adapter Pack 2.0

A hotfix is available to resolve this issue. This hotfix is available individually and is included in Cumulative Update 3 for BizTalk Adapter Pack 2.0.

For more information about how to obtain the cumulative update package, click the following article number to view the article in the Microsoft Knowledge Base:
2557150 Cumulative update package 3 for BizTalk Adapter Pack 2.0

REFERENCES
For more information about BizTalk Server hotfixes, click the following article number to view the article in the Microsoft Knowledge Base:
2003907 Information about BizTalk Server hotfixes
For more information about performance counters, visit the following MSDN website:
Properties

Article ID: 2554806 - Last Review: 09/01/2011 01:48:00 - Revision: 2.0

  • kbqfe kbfix kbexpertiseadvanced kbsurveynew kbbtsadapters KB2554806
Feedback
tml>p;t=">dy>