Appservice connection status sometimes coming as “Success” and sometimes coming as “AppServiceUnavailable” without any code change. Please let me know, why sometimes it give status as “AppServiceUnavailable” Instead of “Success”.

Kalyan Sagar Juturu 96 Reputation points
2021-08-11T09:38:34.343+00:00

I’ve created a sample application which contains an appservice with name “Common.Class1”. We’ve created the appx package from UWP application and deployed the same (This UWP contains win32 folder. Under win32 folder we’ve added winforms exe and its dependencies).
In windows form application, we’re trying to establish the connection with appservice using following code. However, status sometimes coming as “Success” and sometimes coming as “AppServiceUnavailable” without any code change. Please let us know, why sometimes it give status as “AppServiceUnavailable” Instead of “Success”. Please let us know, is anything we have to do for getting always status as “Success”.

         var connection = new AppServiceConnection();
        connection.AppServiceName = "Common.Class1"; 
        connection.PackageFamilyName = "74a49bbb-d13b-4a95-aeb7-6f54a3083440_kfrdrmwcxkph8"; 
        AppServiceConnectionStatus status = AppServiceConnectionStatus.Unknown;
        status = await connection.OpenAsync();

        if (status == AppServiceConnectionStatus.Success)
        {
            // Proceed with Actual logic
        }
Universal Windows Platform (UWP)
{count} votes

Accepted answer
  1. Kalyan Sagar Juturu 96 Reputation points
    2021-08-25T06:44:41.32+00:00

    I had discussed with Microsoft support team, they mentioned, Appservice connection may or may not work, if we launch visual studio in admin mode. They have suggested to launch visual studio in non admin mode to make appservice connection to work always. It seems this is the current limitation/constraint with app service connection.

    0 comments No comments

0 additional answers

Sort by: Most helpful