Когда я вызываю AppService в приложении UWP, AppServiceConnectionStatus возвращает Success.Но когда я вызываю AppService на клиенте winform, AppServiceConnectionStatus по-прежнему возвращает AppServiceUnavailable.UWP, Winform клиентский код одинаков , Ниже приведен один и тот же код в UWP и WinForm:
var appService = new AppServiceConnection();
// Here, we use the app service name defined in the app service provider's Package.appxmanifest file in the <Extension> section.
appService.AppServiceName = "com.yanscorp.appservicedemo.Values";
// Use Windows.ApplicationModel.Package.Current.Id.FamilyName within the app service provider to get this value.
appService.PackageFamilyName = "c97887ad-1f75-4b48-9e3b-21b89c061715_6evysfdvxt248";
//uwp return Success,but winform return AppServiceUnavailable
var status = await appService.OpenAsync();
if (status != AppServiceConnectionStatus.Success)
{
textBlock.Text = "Failed to connect";
return;
}