I'm making an application that runs in XULRunner on Windows.
There I created the browser-toolbar binding that will be used in different places. While the binding needs to look the same it should execute different commands on button clicks.
I'm trying to accomplish it like this (code is simplified, namespaces are dropped):
<binding id="custom-browser-type-a">
<content>
<commandset>
<command id="TypeA:Home" oncommand="home()"/>
<command id="TypeA:Back" oncommand="back()"/>
</commandset>
<browser-toolbar cmd_home="TypeA:Home" cmd_back="TypeA:Back" ... />
<browser/>
</content>
<implementation>
...
</implementation>
</binding>
<binding id="browser-toolbar">
<content>
<toolbar>
<toolbarbutton label="Home" xbl:inherits="command=cmd_home"/>
<toolbarbutton label="Back" xbl:inherits="command=cmd_back"/>
...
</toolbar>
</content>
</binding>
Once clicked a toolbarbutton execute an assigned command just fine. The problem is when I disable a command it doesn't affect the disabled state of a corresponding toolbarbutton, it stays enabled. Does anyone have any idea why that is not working?
Thank you!
Related
I’m trying to set up a Windows 10 multi-app kiosk configuration running a ClickOnce application. I’m following the Microsoft guide https://learn.microsoft.com/en-us/windows/configuration/lock-down-windows-10-to-specific-apps
It works until the ClickOnce application is updated after this it’s not possible run the application.
The problem is the path C:\Users\Musikspelare\AppData\Local\Apps\2.0\EBQ78BLC.1MN\0J3M24G5.KRQ\danc..tion_57ca62a9d061b04b_0002.0000_6fffc994766df618\DancePlayer.exe to the ClickOnce application under the section as this path changes after the application is updated.
Is there any other way of doing this for a ClickOnce application?
The XML configuration file for the multi-app kiosk setup looks as below:
<?xml version="1.0" encoding="utf-8" ?>
<AssignedAccessConfiguration
xmlns="http://schemas.microsoft.com/AssignedAccess/2017/config"
xmlns:rs5="http://schemas.microsoft.com/AssignedAccess/201810/config"
>
<Profiles>
<Profile Id="{AFF9DA33-AE89-4039-B646-3A5706E92957}">
<AllAppsList>
<AllowedApps>
<App AppUserModelId="SpotifyAB.SpotifyMusic_zpdnekdrzrea0!Spotify"/>
<App DesktopAppPath="%ProgramFiles(x86)%\Google\Chrome\Application\chrome.exe"/>
<App DesktopAppPath="C:\Users\Musikspelare\AppData\Local\Apps\2.0\EBQ78BLC.1MN\0J3M24G5.KRQ\danc..tion_57ca62a9d061b04b_0002.0000_6fffc994766df618\DancePlayer.exe"/>
</AllowedApps>
</AllAppsList>
<StartLayout>
<![CDATA[<LayoutModificationTemplate xmlns:defaultlayout="http://schemas.microsoft.com/Start/2014/FullDefaultLayout" xmlns:start="http://schemas.microsoft.com/Start/2014/StartLayout" Version="1" xmlns="http://schemas.microsoft.com/Start/2014/LayoutModification">
<LayoutOptions StartTileGroupCellWidth="6" />
<DefaultLayoutOverride>
<StartLayoutCollection>
<defaultlayout:StartLayout GroupCellWidth="6">
<start:Group Name="">
<start:Tile Size="2x2" Column="0" Row="0" AppUserModelID="SpotifyAB.SpotifyMusic_zpdnekdrzrea0!Spotify" />
<start:DesktopApplicationTile Size="2x2" Column="2" Row="0" DesktopApplicationLinkPath="%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk" />
<start:DesktopApplicationTile Size="2x2" Column="3" Row="0" DesktopApplicationLinkPath="%APPDATA%\Microsoft\Windows\Start Menu\Programs\DancePlayer\DancePlayer.appref-ms" />
</start:Group>
</defaultlayout:StartLayout>
</StartLayoutCollection>
</DefaultLayoutOverride>
</LayoutModificationTemplate>
]]>
</StartLayout>
<Taskbar ShowTaskbar="true"/>
</Profile>
</Profiles>
<Configs>
<Config>
<Account>Musikspelare</Account>
<DefaultProfile Id="{AFF9DA33-AE89-4039-B646-3A5706E92957}"/>
</Config>
</Configs>
</AssignedAccessConfiguration>
I also ran into this issue. Fortunately, multi-app kiosk mode utilizes AppLocker to allow the apps listed under the "AllowedApps" tag. You can use an asterisk (*) as a wildcard in your filepaths to include arbitrary paths that are generated from ClickOnce applications. You would make the following adjustment to your code:
<App DesktopAppPath="%OSDrive%\Users\Musikspelare\AppData\Local\Apps\2.0\*\danc..tion_57ca62a9d061b04b_0002.0000_6fffc994766df618\DancePlayer.exe"/>
You should also include the AMUID of the app as it's listed from the Get-StartApps cmdlet to the "AllowedApps" list.
I haven't been able to test whether the AMUID looking portion of that path, "danc..tion_57ca62a9d061b04b_0002.0000_6fffc994766df618" is generated as part of the install or if it's a GUID. It may also change when the ClickOnce apps updates, if that's the case, just remove that portion from the path and it should take care of it.
And for anybody using Intune, I wasn't able to include an asterisk in the path for a multi-app setup under the Kiosk Template. You will have to create a profile that includes the AssignedAccess policy and add your own XML.
https://learn.microsoft.com/en-us/windows/client-management/mdm/assignedaccess-csp
I want to change the value for Identity Version in below code
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" >
<Identity Name="Sample.Product " Publisher="CN=1234" Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="456" PhonePublisherId="0" />
</Package>
I tried changing using following XmlPoke code.
<XmlPoke XmlInputPath="Package.appxmanifest" Namespaces="<Namespace Prefix='n' Uri='http://schemas.microsoft.com/developer/vsx-schema/2011' Name='N' />" Query="/n:Package/n:Identity/#Version" Value="$(Version)" />
the line doesn't change the version.
Whats going wrong in above code?
Identity, which you're looking for, is in the default namespace of Package, so in your XmlPoke you'll need to use that namespace. To do that, change the URI of your XmlPoke to be http://schemas.microsoft.com/appx/manifest/foundation/windows10, like so:
<XmlPoke XmlInputPath="Package.appxmanifest" Namespaces="<Namespace Prefix='n' Uri='http://schemas.microsoft.com/appx/manifest/foundation/windows10' />" Query="/n:Package/n:Identity/#Version" Value="$(Version)" />
We are trying to add iot capabilities to our Package.appxmanifest for a cordova project. Visual studio complains that the capability we are trying to use cannot be found nor is it a child of the foundation name space.
The underlined iot:Capability shows the following when hovered over:
The element 'BackgroundTasks' in namespace 'http://schemas.microsoft.com/appx/manifest/foundation/winows10' has invalid child element 'Capabilities' in namespace 'http://schemas.microsoft.com/appx/manifest/iot/windows10'. List of possible elements expected: '...
The thing is I created this as a new project and let vs do all the work yet it cannot resolve it's own entries it's creating. We see this with both a new C# and JS project that VS generated. Can anyone help us? (Yes we added the references "Windows IoT Extensions for the UWP" 10.0.10586.0 to the project as well.). FYI We get the same error when adding as well.
Here's the package.appxmanifest:
<?xml version='1.0' encoding='utf-8'?>
<Package IgnorableNamespaces="uap mp iot" xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10">
<Identity Name="com.project.syndication.sitepad" Publisher="CN=$username$" Version="2.0.0.0" />
<mp:PhoneIdentity PhoneProductId="a885d1d0-453e-11e6-a59d-550bfa336405" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>SitePad App</DisplayName>
<PublisherDisplayName>ERT</PublisherDisplayName>
<Logo>images\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily MaxVersionTested="10.0.10586.0" MinVersion="10.0.10586.0" Name="Windows.Universal" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="com.project.syndication.sitepad" StartPage="ms-appx-web:///www/index.html">
<uap:VisualElements BackgroundColor="#464646" Description="CordovaApp" DisplayName="SitePad App" Square150x150Logo="images\Square150x150Logo.png" Square44x44Logo="images\Square44x44Logo.png">
<uap:SplashScreen Image="images\splashscreen.png" />
<uap:DefaultTile ShortName="SitePad App" Square310x310Logo="images\Square310x310Logo.png" Square71x71Logo="images\Square71x71Logo.png" Wide310x150Logo="images\Wide310x150Logo.png" />
</uap:VisualElements>
<uap:ApplicationContentUriRules>
<uap:Rule Match="ms-appx-web:///" Type="include" WindowsRuntimeAccess="all" />
</uap:ApplicationContentUriRules>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<uap:Capability Name="picturesLibrary" />
<iot:Capability Name="systemManagement" />
</Capabilities>
</Package>
The hovering error looks like a bug with something(VS?), I'm seeing it multiple times, yet my code still compiles and runs OK.
No worries on this.
I've got a Web API 2 project set up using Code First. The publish dialog was detecting the DB and allowing me to use Code First Migrations.
I then added a second DB connection using the steps here.
Now when I publish, the dialog only detects the new database and does not give me any options for the original one.
I removed every reference to the second DB that I can find, but the Publish dialog is still showing references to it (and not to the original DB). I've compared my current revision to the one before I added the second DB, and the pubxml for my publishing profile is different, but VS auto-generates the part that is different:
Before:
<PublishDatabaseSettings>
<Objects>
<ObjectGroup Name="DefaultConnection" Order="1" Enabled="True">
<Destination Path="" />
<Object Type="DbCodeFirst">
<Source Path="DBMigration" DbContext="Project.Models.ApplicationDbContext, Project" MigrationConfiguration="Project.Migrations.Configuration, Project" Origin="Convention" />
</Object>
</ObjectGroup>
</Objects>
</PublishDatabaseSettings>
...
<ItemGroup>
<MSDeployParameterValue Include="$(DeployParameterPrefix)DefaultConnection-Web.config Connection String">
<ParameterValue>Data Source=localhost;Initial Catalog=OriginalDB;User ID=user;Password=password</ParameterValue>
</MSDeployParameterValue>
</ItemGroup>
<ItemGroup>
<_ConnectionStringsToInsert Include="DefaultConnection" />
</ItemGroup>
After:
<PublishDatabaseSettings>
<Objects>
<ObjectGroup Name="NewDatabase" Order="2" Enabled="False" xmlns="">
<Destination Path="" />
<Object Type="DbDacFx">
<PreSource Path="Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=newcatalog;Integrated Security=True;Application Name=EntityFramework" includeData="False" />
<Source Path="$(IntermediateOutputPath)AutoScripts\NewDatabase_IncrementalSchemaOnly.dacpac" dacpacAction="Deploy" />
</Object>
<UpdateFrom Type="Web.Config">
<Source MatchValue="data source=(localdb)\MSSQLLocalDB;initial catalog=newcatalog;integrated security=True;MultipleActiveResultSets=True;App=EntityFramework" MatchAttributes="$(UpdateFromConnectionStringAttributes)" />
</UpdateFrom>
</ObjectGroup>
</Objects>
</PublishDatabaseSettings>
...
<ItemGroup>
<MSDeployParameterValue Include="$(DeployParameterPrefix)NewDatabase-Web.config Connection String" />
</ItemGroup>
I'm not sure where this is being generated from, how would I go about getting this to work with both databases, or failing that, getting it back to the point where it works with the original DB?
I am using vs2013 and vs2015 and cannot remove the service references:
a normal right click and then delete show do the job (or the delete key on the keyboard when selected)
But I get:
The configuration for the service reference could not be deleted due to the following issue: An error occurred creating the configuration section handler for system.serviceModel/bindings: AssemblyResolveEvent handlers cannot return Assemblies loaded for reflection only.
Here is the part of my web.config (line 249 and more)
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="PayPalAPISoapBinding">
<security mode="Transport" />
</binding>
<binding name="PayPalAPIAASoapBinding">
<security mode="Transport" />
</binding>
<binding name="PayPalAPISoapBinding1" />
<binding name="PayPalAPIAASoapBinding1" />
<binding name="PayPalAPISoapBinding2">
<security mode="Transport" />
</binding>
<binding name="PayPalAPIAASoapBinding2">
<security mode="Transport" />
</binding>
<binding name="PayPalAPISoapBinding3" />
<binding name="PayPalAPIAASoapBinding3" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://api.sandbox.paypal.com/2.0/" binding="basicHttpBinding" bindingConfiguration="PayPalAPISoapBinding" contract="PayPalSvc.PayPalAPIInterface" name="PayPalAPI" />
<endpoint address="https://api-aa.sandbox.paypal.com/2.0/" binding="basicHttpBinding" bindingConfiguration="PayPalAPIAASoapBinding" contract="PayPalSvc.PayPalAPIAAInterface" name="PayPalAPIAA" />
<endpoint address="https://api.sandbox.paypal.com/2.0/" binding="basicHttpBinding" bindingConfiguration="PayPalAPISoapBinding2" contract="PayPalLive.PayPalAPIInterface" name="PayPalAPI1" />
<endpoint address="https://api-aa-3t.sandbox.paypal.com/2.0/" binding="basicHttpBinding" bindingConfiguration="PayPalAPIAASoapBinding2" contract="PayPalLive.PayPalAPIAAInterface" name="PayPalAPIAA1" />
</client>
</system.serviceModel>
I referenced the WSDL from paypal years ago and rebuild the whole thing using the nuget package (REST instead of the old soap api)
But I cannot cleanup the old wsdl code and (service)references.
I got the same error if I deleted the web.config part and deleted the reference afterwards.
Steps to manually fix it:
Removed the client and bindings part from the system.serviceModel in the web.config manually.
Removed the service reference dir from the filesystem
manually edited my *.csproj file. (Searched for paypal and removed everything except the new nuget reference. Also removed the "service reference" reference from the csproj.)
Delete web.config then delete the service reference.
Restore the web.config afterwards and clean up any binding references.