Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

OECGI4 registry entry

When applying the oecgi4.reg that is provided it creates the values in OECGI4 ok.
BUT, also does the OECGI4.reg for OI10 which then overwrite yours.
I tried creating a key under OECGI4 of 'api' and mod your .reg to create it, but that did not work.
Hope you get what my issue is (expect eventually the same for others).

What is your recommendation to resolve my issue.

Sorry if I have not got all the technical terms correct.

Comments

  • I understand what you are trying to do. When you say "that did not work", in what sense did it not work? Did the Registry not change or something else?
  • edited March 2022
    Just ran the existing working GET api in postman and got this response.
    http://localhost/api/bsmob_jobclock/displaysiteinstruction?job_no=26885
    Cannot process query:
    /cgi-bin/oecgi4.exe/displaysiteinstruction%3Fjob_no%3D26885

    I have url rewrite setup (not changed anything)
    I feel there is one more spot I have to change - will try a reboot now and update you.
  • ...reboot - still same
  • edited March 2022
    So the Registry is changed, but you are simply unable to connect to the engine server?
  • Yes. (Have to leave in 5mins - back in 2 hrs) - thanks for the help so far.
    Here is my registry:


  • Barry,

    Thanks for the screenshot. The 'Cannot process query' message indicates that RUN_OECGI_REQUEST handled the request and not the HTTP_MCP program. This also means that the request made it to the OEngineServer (OESocketServer.jar) process.

    If you take the registry settings from 'OECGI4/api' and move them right into the 'OECGI4' registry folder your request should execute HTTP_MCP. This is my suggestion to keep things as simple as possible for now.

    You do not need to reboot or restart anything when changing the OECGI4 registry settings. Those settings are read by OECGI4.exe each time a request comes in so any changes take effect immediately.

    Here is a little bit more clarification on what's happening. When a request comes in like:

    /cgi-bin/oecgi4.exe/displaysiteinstruction

    OECGI4.exe first looks to see if there is a `OECGI4/cgi-bin` registry path. If it does, then those registry settings are used for the request. If it can't find that registry path then it looks at 'OECGI4' registry path for the settings.

    In order for your 'OECGI4/api' registry settings to get picked up your OECGI4.exe request would have to be:

    /api/oecgi4.exe/displaysiteinstruction

    This means you would have to change your virtual directory name from 'cgi-bin' to 'api' which could break other settings which is why I think it's easiest at this point to just move the settings from 'OECGI4/api' to 'OECGI4'.

    Please clarify what URL rewrite rules you have setup as the underscore in the path '/api/bsmob_jobclock/displaysiteinstruction' might cause issues depending on what version of the rewrite rules you have installed.
  • edited March 2022
    If you take the registry settings from 'OECGI4/api' and move them right into the 'OECGI4' registry folder your request should execute HTTP_MCP. This is my suggestion to keep things as simple as possible for now.

    That is how it has been working.

    This means you would have to change your virtual directory name from 'cgi-bin' to 'api' which could break other settings which is why I think it's easiest at this point to just move the settings from 'OECGI4/api' to 'OECGI4'.


    Then will OI10 O4W console still work?


    This appears to be a workaround, so, I assume there will be a further official setup advise as I am sure I am not robinson crusoe in this situation OR do I need a different setup in the registry for OICONSOLE , EXAMPLES and O4W. Maybe that has not been setup correctly, so OI10 can use those and the OECGI4 one used for yours.

    This is what I have foe rewrite, dont have a clue about the version.

    cgi-bin points to C:\inetpub\CGI-Bin (I dont think it needs to be there).
    So what do I need to do about chaning it to API , I have renamed the existing Api to ApiPBC.


  • Change the oecgi4 to the http one, so back to normal.
    Will wait further instructions/testing
  • Barry,

    Disregard the previous suggestion to move the 'OECGI4/api' registry settings to 'OECGI4'. Let me get you some instructions specific to OI 10 because the OI 10 default registry settings are going to conflict with the SRP HTTP Framework registry settings. I'll try and get this to you by Monday.

    You are close and if you would like to try and press ahead you might be able to make it work by referring to the URL Rewrite Rules Setup page for the SRP HTTP Framework by following these steps:

    1. Follow the section 'Adding an API to an Existing Site'
    2. In your registry rename the 'OECGI4/api' branch to be 'OECGI4/oecgiapi' for your SRP HTTP Framework settings.
    3. This should allow you to reach the REST API using www.example.com/oecgiapi/oecgi4.exe/displaysiteinstruction.
    4. If the previous step works then try the URL www.example.com/api/displaysiteinstruction which should give you the same results but utilize the rewrite rules.

    That should allow you to utilize the SRP HTTP Framework and the OI Console at the same time. By making a new virtual directory in IIS named 'oecgiapi' you'll be able to use 'OECGI4/oecgiapi' as a configuration branch in the registry. The rewrite rules will then make /oecgiapi/oecgi4.exe accessible as /api when requests are received by the server.
  • Ok, after I re-read this 10 times I will give it a go - after backing up everything in sight !!!👀😂
  • Totally stuffed it.

    Postman

    Do this:

    .

    I shall wait for your document!!

    FYI: (I know, I know too much information, promise wont post any further)

    Gives this response:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


    IIS 10.0 Detailed Error - 404.2 - Not Found



    Do this:


    this gives my json response.

    I shall wait for your document and I also need a working web.config file as one with created with copy paste gives an xml error. Sorry, but could not follow the manual way from the form I see for url rewrite.

    Ss I am using localhost was a bit confused as to where things were add when the doc made references to api.example.com website.
    I assume I am in inetpub/wwwroot but still lost as to what goes in which folder and what folders are created where.

  • ... ok i lied 😜 . I have an overnight full system backup, not sure if IIS is in there or where to find it.
    Ok, over and out.
  • Ok, I know I should not keep adding, so, I wont tell you, that, after a good nights sleep and a few ales, I have it now ALL working including the registry.
  • @JaradBratu
    Disregard the previous suggestion to move the 'OECGI4/api' registry settings to 'OECGI4'. Let me get you some instructions specific to OI 10 because the OI 10 default registry settings are going to conflict with the SRP HTTP Framework registry settings. I'll try and get this to you by Monday.


    Have put an document together regarding this and a more precise IIS setup and rewrite rules all in one document that you could post here. I think I had to go to different sources to get it all together and I am sure when I get to setup in a live environment I will have forgotten what I did.
  • Not yet, when I went through my notes to write the documentation I was surprised to see that OECGI4 behaves differently when used with the OI Web Console versus O4W or with the SRP HTTP Framework. The bottom line is that the existing documentation still worked and didn't conflict with OI 10. Regardless, I am working on a start to finish video of the process.
Sign In or Register to comment.