You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within the Console app I start the AppService connection:
private static async void InitializeAppServiceConnection()
{
AppServiceConnection Connection = new AppServiceConnection();
Connection.AppServiceName = "SampleInteropService";
Connection.PackageFamilyName = Package.Current.Id.FamilyName;
Connection.RequestReceived += Connection_RequestReceived;
Connection.ServiceClosed += Connection_ServiceClosed;
AppServiceConnectionStatus status = await Connection.OpenAsync();
if (status != AppServiceConnectionStatus.Success)
{
// something went wrong ...
Console.WriteLine("status not success on connecting, status:" + status + " pacakgeName:" + Connection.PackageFamilyName);
}
else
{
Console.WriteLine("Status success!");
}
}
Somewhere from the UWP app, I start the FullTrustProcess like documented:
if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.FullTrustAppContract", 1, 0))
{
await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
}
The console app starts like expected but the connection is not successful, console.writeline prints:
status not success on connecting, status:Unknown pacakgeName:df84c6a8....
I verified that the packageName is correct.
When I remove <rescap:Capability Name="allowElevation" /> from Package.appxmanifest and <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> from app.manifest, then the connection is successful!
So why, due elevated client-app, is the connection not working?
I need elevated permissions to do more actions from the console app. Don't bother asking what that is, I know I will have Microsoft Store limitations, etc. Please help me solve this issue.
Do I need to use another packageName? Is that changed when using allowElevation? How can I find this out?
The text was updated successfully, but these errors were encountered:
Ruud-cb
changed the title
runFullTrust Desktop bridge with allowElevation
Using AppService with runFullTrust Desktop bridge and allowElevation
Oct 25, 2019
I have:
This is (part of) the package.appxmanifest that tells you how it is setup:
As you can see I want to run it in the same process.
The Console app contains an app.manifest, so that I can define elevated permissions needed:
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
Within the Console app I start the AppService connection:
Somewhere from the UWP app, I start the
FullTrustProcess
like documented:The console app starts like expected but the connection is not successful, console.writeline prints:
I verified that the packageName is correct.
When I remove
<rescap:Capability Name="allowElevation" />
from Package.appxmanifest and<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
from app.manifest, then the connection is successful!So why, due elevated client-app, is the connection not working?
I need elevated permissions to do more actions from the console app. Don't bother asking what that is, I know I will have Microsoft Store limitations, etc. Please help me solve this issue.
Do I need to use another packageName? Is that changed when using
allowElevation
? How can I find this out?The text was updated successfully, but these errors were encountered: