Skip to content

Latest commit

 

History

History
 
 

Syndication

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Syndication sample

This sample shows you how to retrieve feeds from a web service using classes in the Windows.Web.Syndication namespace in your Universal Windows Platform (UWP) app. This sample is provided in the JavaScript, C#, and C++ programming languages.

Note  This sample was created using one of the universal app templates available in Visual Studio. It shows how its solution is structured so it can run on Windows 10. For more info about how to build apps that target Windows and Windows Phone with Visual Studio, see Build apps that target Windows 10 by using Visual Studio.

This sample demonstrates the following features:

Note  Use of this sample requires Internet or intranet access in order to retrieve feeds.

Network capabilities

This sample requires that network capabilities be set in the Package.appxmanifest file to allow the app to access the network at runtime. These capabilities can be set in the app manifest using Microsoft Visual Studio.

To build the sample, set the following network capabilities:

  • Internet (Client & Server): This sample has complete access to the network for both client operations (outbound-initiated access) and server operations (inbound-initiated access). This allows the app to download various types of content from an HTTP server and upload content to an HTTP server located on the Internet or on a local intranet. This is represented by the Capability name = "internetClientServer" tag in the app manifest.

    Private Networks (Client & Server): The sample has inbound and outbound network access on a home or work network (a local intranet). This allows the app to download various types of content from an HTTP server and upload content to an HTTP server located on a local intranet. The Private Networks (Client & Server) capability is represented by the Capability name = "privateNetworkClientServer" tag in the app manifest.

For more information on network capabilities, see How to set network capabilities.

Related topics

Other - C#/VB/C++ and XAML

RSS/Atom feeds

Adding support for networking (XAML)

Networking basics

Reference

SyndicationClient

SyndicationItem

Windows.Web.AtomPub

Windows.Web.Syndication

Samples

RSS reader sample

AtomPub sample

System requirements

Client: Windows 10

Server: Windows Server 2016 Technical Preview

Phone: Windows 10

Build the sample

  1. If you download the samples ZIP, be sure to unzip the entire archive, not just the folder with the sample you want to build.
  2. Start Microsoft Visual Studio 2015 and select File > Open > Project/Solution.
  3. Starting in the folder where you unzipped the samples, go to the Samples subfolder, then the subfolder for this specific sample, then the subfolder for your preferred language (C++, C#, or JavaScript). Double-click the Visual Studio 2015 Solution (.sln) file.
  4. Press Ctrl+Shift+B, or select Build > Build Solution.

Run the sample

The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it.

Deploying the sample

  • Select Build > Deploy Solution.

Deploying and running the sample

  • To debug the sample and then run it, press F5 or use Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or use Debug > Start Without Debugging.