Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi Guys!
 
I am trying to create a metro application where the user can download applications that are available to them via the software catalog. After reading a few articles I came across this TechNet article that more or less gives me the code to do this:
 
http://blogs.technet.com/b/configmgrteam/archive/2012/09/19/extending-the-application-catalog-in-system-center-2012-configuration-manager.aspx[^]
 
Code:
public MainWindow()
        {
            InitializeComponent();
 
            string url = "https://SERVERNAME/CMApplicationCatalog/ApplicationViewService.asmx";
 
            BasicHttpBinding binding = new BasicHttpBinding();
            binding.Security.Mode = BasicHttpSecurityMode.Transport;
            binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows;
 
            ApplicationCatalogService.ApplicationViewServiceSoapClient sc = new ApplicationViewServiceSoapClient(binding,new EndpointAddress(url));
            int total = 0;
            AppDetailView[] apps = sc.GetApplications(
                ApplicationProperty.Name,
                null,
                ApplicationProperty.Name,
                "",
                20,
                0,
                true,
                ApplicationClassicDisplayName.PackageProgramName,
                false,
                null,
                out total);
 
            foreach (var item in apps)
            {
                MessageBox.Show(item.Name);
            }
        }
 
This code will work for me using WPF or console applications but for some reason (im assuming performance reasons) only the ".GetApplicationsAsync" method is available. I have played around with this async method but am getting no reply - has anyone had any experience with this?
 
I assume only the async method is available due to the fluidity of metro apps?
I'm also getting an error that the web service isn't replying although I can navigate to that url and use it in WPF code...
 
Thank you.
Posted 18-Jun-13 1:40am
Edited 19-Jun-13 0:55am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Correct that methods like the one you're describing should all be async in order to keep the Win8 app moving.
Is it possible that you don't have the correct capabilities selected in your app's package manifest to give you internet access?
Also, be sure to use the "await" keyword so that you (eventually) get the return value(s) you're expecting.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 BillWoodruff 300
1 Mathew Soji 274
2 Afzaal Ahmad Zeeshan 268
3 DamithSL 225
4 Sergey Alexandrovich Kryukov 205
0 OriginalGriff 6,249
1 Sergey Alexandrovich Kryukov 5,853
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 3,865


Advertise | Privacy | Mobile
Web04 | 2.8.1411019.1 | Last Updated 20 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100