Highlighted
Absent Member.
Absent Member.
514 views

deploy managed cobol dll with.net project .net in IIS

Jump to solution

I have made a dll with visual cobol for visual studio 2.3 and it works in a web project asp c # locally. The dll works correctly using the visual studio environment 2012 in a machine with cobol server 2.3. If it is deployed in a local IIS it works, but if it is deployed in a windows server with IIS and cobol server 2.3 it does not work. the cobol server is correctly licensed.

Apply the configurations mentioned in community.microfocus.com/.../deploy-a-visual-cobol-asp-net-web-site-under-iis and still continue without function.

What additional configuration should be applied? How to add to the IIS the environment of the cobol server 2.3?

I appreciate in advance the collaboration that I can provide.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: deploy managed cobol dll with.net project .net in IIS

Jump to solution
OK, so the COBOL program is found and being called correctly but COBDATA is not being picked up. Sometimes you do need to restart the server machine, (not just IIS) in order to get this to take effect. You could also set it in the web.config file and it should be picked up from there.

Are you using the COBOL RunUnits class in your application? In a multi-threaded environment where you are calling COBOL programs from a C# application you should protect the COBOL resources by creating an instance of the RunUnit class in C# and then adding your COBOL program to the RunUnit prior to calling it. This will protect the working-storage data, file areas, database connections, etc. from colliding between threads.

View solution in original post

0 Likes
4 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: deploy managed cobol dll with.net project .net in IIS

Jump to solution
So the actual ASP.NET application is in C# and this is simply calling a COBOL program in a managed ,DLL, correct?

Can you please expand on "it is deployed in a windows server with IIS and cobol server 2.3 it does not work."?
What is the error or behavior that occurs?
Does an exception occur in the C# code when trying to invoke a method in the COBOL .DLL?
Are you using ilsmartlinkage directive?
Is it locating the COBOL .DLL? Is it installed in the GAC?
What Windows Server and IIS version is in use?

Thanks,
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: deploy managed cobol dll with.net project .net in IIS

Jump to solution
Hi Chris, yes the ASP.NET application is in C# and call a managed cobol in dll. the application is not using the variable COBDATA, it seems that it can not read it. the variable is defined as a enviromment variable for all users and processes. i need restart the server?

No, i don´t not use the ilsmartlinkage directive.

its a windows server 12 R2 and IIS 7.

Thanks.
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: deploy managed cobol dll with.net project .net in IIS

Jump to solution
OK, so the COBOL program is found and being called correctly but COBDATA is not being picked up. Sometimes you do need to restart the server machine, (not just IIS) in order to get this to take effect. You could also set it in the web.config file and it should be picked up from there.

Are you using the COBOL RunUnits class in your application? In a multi-threaded environment where you are calling COBOL programs from a C# application you should protect the COBOL resources by creating an instance of the RunUnit class in C# and then adding your COBOL program to the RunUnit prior to calling it. This will protect the working-storage data, file areas, database connections, etc. from colliding between threads.

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: deploy managed cobol dll with.net project .net in IIS

Jump to solution
Hi Chris,

Yes, the server was restarted and the visual cobol visual dll worked correctly.

Thanks for you help.
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.