question

JonathanAguilarNavarro-7026 avatar image
0 Votes"
JonathanAguilarNavarro-7026 asked NicoZhu-MSFT commented

Unknown error when creating connection with AppService UWP

I have the following c# code that creates a connection between my main app and a uwp app that performs a number of functions

 using (var connection = new AppServiceConnection())
             {
                 //Set up a new app service connection
                 connection.AppServiceName = "NombreAppService";
                 connection.PackageFamilyName = "NombreFamilia_xxxxxxxxxxx";
                 AppServiceConnectionStatus status = await connection.OpenAsync();
    
                 V_Resultado.OperacionCompleta = false;
                 V_Resultado.HuboError = true;
                 switch (status)
                 {
                     case AppServiceConnectionStatus.Success:
                         //await MostrarMensaje("Connection established", "Dato", MessageBoxButton.Aceptar);
                         V_Resultado.OperacionCompleta = true;
                         V_Resultado.HuboError = false;
                         break;
                     case AppServiceConnectionStatus.AppNotInstalled:
                         V_Resultado.MensajeUsuario = "La aplicación AppServicesProvider no está instalada. Implemente AppServicesProvider en este dispositivo y vuelva a intentarlo.";
                         return V_Resultado;
                     case AppServiceConnectionStatus.AppUnavailable:
                         V_Resultado.MensajeUsuario = "La aplicación AppServicesProvider no está disponible. Esto podría deberse a que se está actualizando actualmente o se instaló en un dispositivo extraíble que ya no está disponible.";
                         return V_Resultado;
                     case AppServiceConnectionStatus.AppServiceUnavailable:
                         V_Resultado.MensajeUsuario = $"La aplicación AppServicesProvider está instalada pero no proporciona el servicio de la aplicación {connection.AppServiceName}.";
                         return V_Resultado;
                     default:
                     case AppServiceConnectionStatus.Unknown:
                         V_Resultado.MensajeUsuario = "Se produjo un error desconocido mientras intentábamos abrir una AppServiceConnection.";
                         return V_Resultado;
                 }

But sometimes when trying to make the connection the state that returns me is Unknown, and I can't find the reason.

I would greatly appreciate the help you can give me.

Thank you






windows-uwp
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Does the following answer solve your problem?

0 Votes 0 ·

1 Answer

DSPatrick avatar image
0 Votes"
DSPatrick answered

Q&A forums are currently English only. I'd try asking for help over here in dedicated forums.
https://social.msdn.microsoft.com/Forums/es-es/home
https://social.technet.microsoft.com/Forums/es-es/home
https://answers.microsoft.com/es-es

--please don't forget to upvote and Accept as answer if the reply is helpful--


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.