Absent Member.
Absent Member.
1028 views

WCF Services hosted in IIS 7 calling unmanaged COBOL

Jump to solution

[Migrated content. Thread originally posted on 14 February 2012]

I'm attempting to create web services that call unmanaged COBOL code. I thought everything was all well and fine until I started load testing and receiving accessViolationException exceptions. I did find the following article which was a great help http://www.philadelphia.edu.jo/courses/csharp/PInvoke_tcm21-6374.pdf, and as an alternative to aspcompat="true" http://devlicio.us/blogs/scott_seely/archive/2009/07/17/calling-an-sta-com-object-from-a-wcf-operation.aspx, but I'm still having some issues.

So I compiled my unmanaged dll using the REENTRANT(2) directive and that seemed to work okay, but memory is never released. Then I tried creating the COM server interface using the toolkit, but when I get multiple threads running against the COM component the accessViolationException is being thrown again. I tried setting the REENTRANT directive in the project directives, Build directives, and I tried specifying them during the Service Interface wizard, but when I deploy the COM I still get the same exception.

My other issue is disposing of the unmanaged resources. To release the resources do I just need to execute a stop run? Will this release resources from all of the modules that were called through the entire process?

If you need more information let me know.

Thank you,
Tony
0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert
This has been taken offline in the form of a Supportline incident with customer.
I will post the findings at the completion of our investigation.

Thanks.

View solution in original post

0 Likes
1 Reply
Micro Focus Expert
Micro Focus Expert
This has been taken offline in the form of a Supportline incident with customer.
I will post the findings at the completion of our investigation.

Thanks.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.