Each Edge browser request requires an appropriate response to send. If not, then the accompanying UWP (and the associated Win32 application, if any) will exit with a link to "SystemPolicy". To illustrate this problem, I can refer to SecureInput .
private async void OnAppServiceRequestReceived(AppServiceConnection sender, AppServiceRequestReceivedEventArgs args)
{
AppServiceDeferral messageDeferral = args.GetDeferral();
try
{
if (this.desktopBridgeAppLaunched)
{
this.currentConnectionIndex = Int32.Parse(sender.AppServiceName);
this.desktopBridgeConnection = desktopBridgeConnections[this.currentConnectionIndex];
AppServiceResponse desktopBridgeResponse = await this.desktopBridgeConnection.SendMessageAsync(args.Request.Message);
await args.Request.SendResponseAsync(desktopBridgeResponse.Message);
}
else
{
throw new Exception("Failed to launch desktopBridge App!");
}
}
finally
{
messageDeferral.Complete();
}
}
After commenting on the line that calls "SendResponseAsync (...)", UWP and the Win32 application (PasswordInputProtection.exe) exit because the OnAppServicesCanceled (...) handler is called with a SystemPolicy cause.
, . , Edge Extension. SendMessageAsync (...) Win32 UWP.
, , , , ACK UWP. , , - ?