deploy managed cobol dll project .net in IIS

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 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.

  • 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?

  • 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.

  • Verified Answer

    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.
  • Hi Chris,

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

    Thanks for you help.