Visual Studio BizTalk Schema Generator Wizard error: Error occurred while creating the BizTalk port configuration file

  • Sandro Pereira
  • May 18, 2020
  • 3 min read

After several days migrating BizTalk open‑source contributions—such as the BizTalk Mapper Extensions Utility Pack, Pipeline Components Extensions Utility Pack, Mapper Extensions Functoid Project Template, and Functoid Wizard—I returned to one of my favorite topics: errors and warnings, their causes, and solutions.

I also migrated several tools, including BizTalk Filter Finder, Bindings Exporter, and Port Multiplier for BizTalk Server 2020.

During this work, I ran into a small development issue while consuming the Adapter Service to generate Oracle schemas in Visual Studio.

I have performed this task thousands of times, and it is usually straightforward once the Oracle connection is configured. However, this time Visual Studio returned an unexpected error:

Error occurred while creating the BizTalk port configuration file. Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Consume Adapter Service Schema Generator BizTalk port configuration error

A curious fact is that the Wizard was able to successfully generate the Oracle Schemas. The problem occurred while it was trying to generate the Binding file.

📝 One-Minute Brief

Explains how to resolve the Visual Studio BizTalk Schema Generator Wizard error “Error occurred while creating the BizTalk port configuration file”, which appears when consuming adapter services, even though schemas are generated successfully.

Cause

Unfortunately, I could not determine the exact cause of this error. Based on my analysis, it likely results from special characters in Oracle metadata or incompatibilities between Oracle and .NET data types used during binding file generation.

However, this issue does not block development. The wizard still generates all required BizTalk artifacts, including the Oracle schemas.

The wizard fails only when generating the binding file. Although this file simplifies port creation in the BizTalk Server Administration Console, it is not mandatory.

Even without the binding file, you can manually create the receive or send ports and continue the implementation without further issues.

Solution

Well, you know me, it is possible to manually create the ports without requiring the binding files; however, this is an accelerator that I prefer not to lose. So, I had to investigate and solve this problem before it appeared more often.

And in fact, the solution is quite easy:

  • On the Consume Adapter Service Schema Generator Wizard, while you are configuring the connection string to Oracle, configure the URI, select the Binding Properties tab.
Consume Adapter Service Schema Generator BizTalk port configuration solution
  • On the Binding Properties tab, scroll down to the Metadata section. There you will find a property called: EnableSafeTyping.
    • This feature controls how the adapter surfaces certain Oracle data types, and by default, this value is false.
  • To solve this issue, you need to change the EnableSafeTyping value to true.
Consume Adapter Service Schema Generator BizTalk port configuration solution

Since not all .NET and Oracle types are created equally, we occasionally need to set the value true for this property to handle some constraints around data types.

This is not a unique Oracle issue; this same error may happen when you are trying to generate schemas from SAP, too.

Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son. 

Thanks for Buying me a coffe
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top