Search code examples
iisemsrad-studio

Using emsserver/emsserver.dll in URL of API Call in Production Environment


I have created an application that utilizes RAD Studio's EMS Server functionality. The development has been completed and tested in a production environment. The EMS Server documentation shows that in order to make an API call the emsserver.dll needs to be included in the URL.

https://{hostname}/emsserver/emserver.dll/API/Login?token={TokenValue}

Most APIs I have encountered do not have the dll embedded into the URL.

https://{hostname}/API/Login?token={TokenValue}

This is not a big deal as the API call works fine as is. I was just wondering if there is property or setting I can use in RAD Server or IIS in order to default the emsserver/emsserver.dll portion of the URL.


Solution

  • Do you mean you want to redirect or rewrite the url from https://{hostname}/API/Login?token={TokenValue} to https://{hostname}/emsserver/emserver.dll/API/Login?token={TokenValue} in IIS?

    If this is your reuqimrent, I suggest you could try to use url rewrite extension to achieve your reuqirement.

    You could install it from this url and add below url rewrite rule into your web.config file.

    <system.webServer>
    
    <rewrite>
    <rules>
                    <rule name="Redirect to dll">
                        <match url="API/Login" />
                        <action type="Rewrite" url="https://{hostname}/emsserver/emserver.dll/API/Login" />
                    </rule>
    
    </rules>
    </rewrite>
    </system.webServer>