Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 682875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:38:42+00:00 2026-05-14T01:38:42+00:00

I have a simple Atom 1.0 feed that I’ve generated, similar to the example

  • 0

I have a simple Atom 1.0 feed that I’ve generated, similar to the example shown on MSDN.

However, instead of creating a host and testing the feed via console application, as in the example, I’m attempting to create the endpoint via configuration.

My configuration is as follows:

<system.serviceModel>
        <services>
            <service
                name="MyNamespace.MyService"
                behaviorConfiguration="returnFaults">
                <endpoint
                    address=""
                    binding="basicHttpBinding"
                    contract="MyNamespace.IMyGenericService">
                </endpoint>
                <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
            </service>
        </services>
        <behaviors>
            <serviceBehaviors>
                <behavior name="returnFaults">
                    <serviceMetadata httpGetEnabled="true"/>
                    <serviceDebug includeExceptionDetailInFaults="true"/>
                </behavior>
            </serviceBehaviors>
        </behaviors>
    </system.serviceModel>

When I run my WCF service, I’m able to access the stock description page and even use this address as a service reference. However, if I attempt to call the method that returns the feed(http://localhost:SomeVSPort/MyService/GetFeed), I get a blank page with no errors. Setting a breakpoint in the method was unsuccessful as the method does not seem to be getting called.

My question is, how should I be exposing this feed for hosting via IIS? Should I be using a different configuration for my endpoint?

For reference, my service declaration follows:

namespace MyNamespace
{
    [ServiceContract]
    public interface IMyGenericService
    {
        [OperationContract]
        [WebGet]
        Atom10FeedFormatter GetFeed();
    }

    public class MyService: IMyGenericService
    {
        public Atom10FeedFormatter GetFeed()
        {
            SyndicationFeed feed = new SyndicationFeed();

        //SimpleEntry is a local class that holds location information in a GeoRSS Simple format.
            IList<SimpleEntry> entries = new List<SimpleEntry>()
            {
                new SimpleEntry() { ID = "1", Point = "45.256 -71.92", Title = "Point 1" },
                new SimpleEntry() { ID = "2", Point = "-71.92 45.256", Title = "Point 2" }
            };

            feed.Items = entries
                .Select(e => new SyndicationItem()
                {
                    Content = new XmlSyndicationContent(
                        "application/xml",
                        new SyndicationElementExtension(e)),
                    Title = new TextSyndicationContent(e.Title),
                    Id = e.ID
                });

            return new Atom10FeedFormatter(feed);
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T01:38:43+00:00Added an answer on May 14, 2026 at 1:38 am

    You’re mixing up SOAP (via the basicHttpBinding in your config) and REST (using the AtomFeedFormatter, and the [WebGet] attribute on your operation contract).

    You need to choose one or the other. Since you want Atom, I assume you really want webHttpBinding in your config:

    <system.serviceModel>
        <services>
            <service
                name="MyNamespace.MyService"
                behaviorConfiguration="returnFaults">
                <endpoint
                    address=""
                    behaviorConfiguration="RESTBehavior"
                    binding="webHttpBinding"
                    contract="MyNamespace.IMyGenericService">
                </endpoint>
            </service>
        </services>
        <behaviors>
            <endpointBehaviors>
               <behavior name="RESTBehavior">
                  <webHttp/>
               </behavior>
            </endpointBehaviors>
            <serviceBehaviors>
                <behavior name="returnFaults">
                    <serviceDebug includeExceptionDetailInFaults="true"/>
                </behavior>
            </serviceBehaviors>
        </behaviors>
    </system.serviceModel>
    

    Since REST doesn’t have things like WSDL and so on, you can get rid of any MEX related stuff, too – just plain REST.

    Check out the WCF REST Developer Center on MSDN for a lot of very useful and informative additional resources!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have simple win service, that executes few tasks periodically. How should I pass
i have simple regular expression: ^123$ Matches are for example 123 1234 etc. How
I have this simple grammer: expr: factor; factor: atom (('*' ^ | '/'^) atom)*;
I have a simple XML string, that is more or less always the same.
I am trying to create a simple atom feed with the respond_to method in
I'm trying to set up a simple atom feed from my Posts model and
I have problems parsing a atom facebook feed. Using: PHP's DOMDocument. Errors: Warning: DOMDocument::loadXML():
I'm trying to parse an Atom feed programmatically. I have the atom XML downloaded
I'm working with antlr 3.2. I have a simple grammar that consists of atoms
Well, i have written a simple python program that parses HTML with HTMLParser. Here

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.