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

Article translations Article translations
Article ID: 2554806
Expand all | Collapse all

On This Page

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:
General information about performance counters

Properties

Article ID: 2554806 - Last Review: September 1, 2011 - Revision: 2.0
Keywords: 
kbqfe kbfix kbexpertiseadvanced kbsurveynew kbbtsadapters KB2554806

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com