Botframework-emulator: Add ability to overwrite endpoint URL via protocol handler

Created on 23 May 2018  ·  8Comments  ·  Source: microsoft/BotFramework-Emulator

In order to add a deep link to the emulator in the BotBuilder .NET Samples, there needs to be a way to accommodate the dynamically assigned localhost port that is given to the sample when it is running in VS [Code].

Ex.
The included .bot file has an endpoint service that defaults to localhost:5000 for the endpoint. However, when the sample is run in Visual Studio, a port is dynamically assigned unless there is a specified config file or line in the sample setup that specifies a port of 5000. So the user will click the emulator deep link, open the emulator, and the emulator will read the bot file and try to connect to the endpoint service at localhost:5000, even though Visual Studio is running the bot at localhost:39734.

A solution to this is allowing an extra parameter to be passed via protocol URI that would allow the port or endpoint URL to be overridden.

Current:
bfemulator://bot.open?path={PATH_TO_BOT_FILE}

Proposed:
bfemulator://bot.open?path={PATH_TO_BOT_FILE}[ &port={PORT_OVERRIDE} | &url={URL_OVERRIDE} ]

Engineering Enhancement

Most helpful comment

@cleemullins Picked up working on it today. Hopefully will have it in by the end of the week.

All 8 comments

@tonyanziano Any updates on this? I would love to see it get wrapped up and the Deep Links into the SDKs!

@cleemullins This is going to require a pretty significant change on the emulator side, which is mostly un-tested. Currently in the process of writing unit tests that will allow me to make the change with confidence.

@tonyanziano Nice. Any forward process? I can't wait to get this into the samples!

@cleemullins Just submitted a PR for the first wave of unit tests. #628

@tonyanziano Any luck wrapping this up? I want to get this in, along with the code in the SDKs!

@cleemullins Picked up working on it today. Hopefully will have it in by the end of the week.

Addressed in #647

Closing with merge of PR.

Was this page helpful?
0 / 5 - 0 ratings