Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

This article applies to the following product:
  • BizTalk Adapter Pack 2.0
  • BizTalk Adapter Pack 2010

↑ Back to the top


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()

↑ Back to the top


Cause

This issue occurs because the WCF-based SAP adapter does not handle the InvalidOperationException exception.

↑ Back to the top


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:


2572999 Cumulative 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

↑ Back to the top


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:

↑ Back to the top


Keywords: kbqfe, kbfix, kbexpertiseadvanced, kbsurveynew, kbbtsadapters, kb

↑ Back to the top

Article Info
Article ID : 2554806
Revision : 2
Created on : 9/11/2018
Published on : 9/11/2018
Exists online : False
Views : 185