Click here to Skip to main content
13,042,630 members (79,501 online)
Rate this:
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:[^]

public MainWindow()
            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(
                out total);
            foreach (var item in apps)

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 0:40am
Updated 18-Jun-13 23:55pm

1 solution

Rate this: bad
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.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 20 Jun 2013
Copyright © CodeProject, 1999-2017
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