The event dll generated by netdefgen is getting errors. It says it could not load the file or assembly 'CefSharp, Version = 0.0.0.0 or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

We need to replace the acucobol browser control with one that does not depend on IE 11. We have tried working with several .net controls including cefsharp and dotnetbrower.  We have tried writing our own .net wrappers around both and directly using both in our cobol code.  

Our latest try is to embed the cefsharp control into our cobol code using netdefgen.  It works fine until we put the dll generated by netdefgen for the event handler into our bin folder.  Once we do that we get "Could not load file or assembly 'CefSharp, Version 0.0.0.0, Culter=neutral, PublicKeyToken=null' or one if its dependencies.  The located assembly's manifest definition does not match the assembly reference"

CefSharp is not the dll we generated the def files and event dll from.  But it is used by the dll we did this for.  It does work fine when used by the dll we generated it for,  We can see this by running without the event dll in the bin folder (we do not get our events but we can display and interact with the browser).

Has anyone had this problem and if so, how did you resolve it?

Thanks!

  • Suggested Answer

    Good morning,

    I am not going into the error you are experiencing, here.

    Instead, I'd like to understand first what it's causing you the need to replace the ACUCOBOL-GT web-browser control.

    I know Microsoft is going to leave IE11, but the web-brower control remains supported by the ACU technology for some years in the future.

    Quoting a similar post you can find in this Community, "We are hoping to provide an updated browser control in our next version (10.5)."

    This new ACU release should be available somewhere during 2022.
    Hopefully you can continue to use the current technology until that moment.

    If you need further support on the error you reported, I suggest you to contact your local Customer Care engineer, opening a Case on the portal ( https://portal.microfocus.com/ ), so that we can help you in finding a good solution.

    Regards.

    Claudio Contardi
    Product Support Engineer, Senior
    Micro Focus

  • I think Claudio has provided all of the information that I was going to provide. So I don't have much to add: Wait for 10.5 when we will introduce WebBrowser2, which is based on Microsoft Edge (technically, WebView2). And if you can't wait that long, raise a support defect.

    But I do have some questions for you, as a Web browser user. The new control will have different events and properties than the current Web Browser, due to the capabilities of the new DLL we are using. So, which events do you depend on, and which properties do you set? I am trying to figure out which properties to support. Especially for the non-obvious ones.

    For example, the current browser has PRINT, PRINT-PREVIEW, PRINT-NO-PROMPT, and PAGE-SETUP. The PRINT-NO-PROMPT has not worked for a while (IE removed that ability as a security violation). And the rest can be satisfied by a single PRINT property, since Chromium (on which Edge is based) has PAGE-SETUP and PRINT-PREVIEW as a default part of PRINT. And PAGE-SETUP and PRINT-PREVIEW aren't really available as separate properties in Edge. Similarly, the CUSTOM-PRINT-TEMPLATE property doesn't make sense in Edge (or rather, it is not obvious how to provide it).

    On the other hand, it is very easy to allow the COBOL program to send javascript to the currently-loaded page with the new control, and that will be a new property that is available with the new control.

    I could provide a current list of what we have for web-browser2, but I prefer to hear from you about what you currently use in the existing web-browser control.

  • We currently make heavy use of the web browser control within our application and have had to do several things regarding IE configuration to make it work.

    We use it as follow:

    • View html generated from acucobol run via iis where updates to the database are done through acuconnect.  This is used for visual work guides, handheld computers and document viewing (.docx, .pdf, .xls etc).
    • Integrate .net applications with our Acucobol application.
    • We are currently trying to intergrate reporting done via Oracle’s Apex tool to our cobol application.

    For all of our browser uses we capture links to navigate and cancel the navigation in the browser to instead link to cobol clients.  This is all integrated and run within the threads generated by the runtime and allows the user to  carry data in and out of the browser based apps and the cobol app.

    We have had to do several things to keep this control working.

    First, we modify the registry of the clients so the web-browser control runs as IE10 or IE11. The default will run as IE7.  IE7 does not work with some of our technology including bootstrap and our grid control in the .net apps.

    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION 
    • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION 
    • For both, add a new dword, with name wrunns.exe, hex value 2AF7  

    We cannot be sure of all of the problems we will run into if IE 11 is removed as we have been running with the FEATURE_BROWSER_EMULATION for a few years.

    Second, we make use of the settings in Internet Explorer to fix problems. An example was reported on case 00023545 where viewing pdf files started crashing the runtime.  We worked around this by setting the internet explorer settings to disable the Adobe PDF Plugin.  This causes IE to open pdf outside the browser window and resolved the problem.  We will not be able to do this with IE 11 uninstalled.

    For Apex, we did try running the browser control so we could capture links and integrate with the cobol application like we do with .net applications.  It was extremely slow and we cannot be sure of where we will hit errors as Apex no longer supports IE of any version.  This is a feature that is important to us and we need the applications integrated asap.

    As far as IE11, we do not have control over the configuration of our customer’s client workstations.  We have one customer that was already planning to uninstall IE 11 as it will not be supported as of June of 2022. We have convinced them to give us a little time as it is not unsupported yet.   Our other customers will do the same.  They are in an environment that has to be kept very secure.

    I have reported this on several cases.  Including 00466546 and 00743933.  I was told that the issue needed to be reported on the forum as it was new development and our issue was not covered by support.

    I did know about the new browser control that is being planned but it is not coming out until the middle of 2022.  That may or may not be after IE11 is unsupported by Microsoft and our customers will not leave unsupported software on their client machines. That is their policy.  We would also need time to develop/test use of the new browser control.

    This issue is urgent for us as our application will not function reliably (or at all) once they do the uninstall. 

    We are in a bind.

  • Properties we modify:
      VISIBLE
      ENABLED 
      LINES
      SIZE
      VALUE
      COPY-SELECTION
      GO-BACK
      GO-FORWARD
      GO-HOME
      GO-SEARCH
      REFRESH
      STOP-BROWSER

    Properties we inquire upon:
      PROGRESS
      MAX-PROGRESS
      VALUE
      STATUS-TEXT
      TITLE
      NAVIGATE-URL


    Events we capture and use
      MSG-WB-DOWNLOAD-COMPLETE
      MSG-WB-TITLE-CHANGE
      MSG-WB-BEFORE-NAVIGATE
      MSG-WB-STATUS-TEXT-CHANGE
      MSG-WB-BEFORE-NAVIGATE
      MSG-WB-PROGRESS-CHANGE
      MSG-WB-NAVIGATE-COMPLETE

  • Hi Dana,

    Thanks for the information. How adversely would you be affected if these weren't all available?

    Modern browsers don't really have a home page - they have a collection of pages they display on startup. So I have removed the GO-HOME property.

    GO-SEARCH would probably be possible to figure out (but Edge doesn't provide a method for doing this). There is probably a registry entry somewhere. On the other hand, just navigating to google.com or bing.com (or another preferred search engine) is easy to do when the user wants to search. So I have omitted this property.

    The PROGRESS properties are also problematic. I can't fine a way to get the new browser control to provide this information. So PROGRESS and MAX-PROGRESS have not been implemented. And MSG-WB-PROGRESS-CHANGE is never sent as an event. Similarly, MSG-WB-DOWNLOAD-COMPLETE is not something I have figured out, though I have not spent as much time trying, yet.

    Again, while we can display the web browser's status bar (which will be a new property you can set), I don't see a way to get the value of that text. So STATUS-TEXT and MSG-WB-STATUS-TEXT-CHANGE are not available.

    The rest will be available. Along with some new properties.

    Note we are still early in development. So things may change, including the inclusion of these properties, or omission of others. Which is why I am asking for your feedback.

  • Hi,

    I have reviewed our code and do not see where any of the issues you bring up would cause us any serious issues.  The most important thing for us besides basic navigation is being able to capture link clicks and redirect back to the cobol application to open a cobol window.

  • Hi.  We decided to try using the WebView2 windows form control since this is what you are using.  With a super simple example we have the same error.  When we put the event dll generated by netdefgen in the bin folder we get an error that Could not load file or assembly Microsoft.Web.Webview2.core. The manifest does not match.  When we remove the netdefgen generated dll from the bin folder it works but we cannot capture events.  Are you using netdefgen to do your development?  And if so, how did you get an event dll to send the events to the cobol program?