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

  • Home
  • SEARCH
  • 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 882585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:27:02+00:00 2026-05-15T12:27:02+00:00

I’m using Clemens Vasters’ XML-RPC implementation to implement an XML-RPC endpoint. When I host

  • 0

I’m using Clemens Vasters’ XML-RPC implementation to implement an XML-RPC endpoint. When I host the service in a console application, it works fine.

I’d like to host it in an ASP.NET MVC application, so I’m using a .SVC file. This is partially working. When I browse to the .SVC file, I see the usual “You have created a service” stuff.

However, when I point my XML-RPC client (Windows Live Writer) at the same location, I get a “400 Bad Request”. I’m guessing that this is because my service isn’t correctly exposed as XML-RPC.

I’ve attempted to configure an endpoint behavior in Web.config, as follows:

<system.serviceModel>
  <services>
    <service name="AnotherBlogEngine.Web.Api.BlogApi">
      <endpoint address=""
                binding="webHttpBinding"
                contract="AnotherBlogEngine.Web.Api.IBlogApi"
                behaviorConfiguration="xmlRpcBehavior" />
  </service>
  </services>
  <extensions>
    <behaviorExtensions>
      <add name="xmlRpc"
           type="AnotherBlogEngine.XmlRpc.XmlRpcEndpointBehaviorElement, \
                 AnotherBlogEngine.XmlRpc" />
    </behaviorExtensions>
  </extensions>
  <behaviors>
    <endpointBehaviors>
      <behavior name="xmlRpcBehavior">
        <xmlRpc/>
      </behavior>
    </endpointBehaviors>
  </behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />

…but it’s not working. What am I doing wrong? Do I have my Web.config correct, or do I have it all completely wrong? Do I need to provide a custom factory in my .SVC file to sort out the behaviors?

The .SVC file looks like this, by the way:

<%@ ServiceHost Language="C#" Debug="true"
    Service="AnotherBlogEngine.Publishing.Service.BlogApi, \
             AnotherBlogEngine.Publishing.Service" %>

Note: Those backslashes aren’t actually there; they’re just for line-wrapping.

Also, at the moment, I’m just testing this in Cassini (VS2010), rather than IIS, but I’ll be aiming it at IIS 7.x.

Update: It’s definitely at least looking at my extension: it calls XmlRpcEndpointBehaviorElement.get_BehaviorType, and if XmlRpcEndpointBehavior doesn’t implement IEndpointBehavior, I get an error to that effect (displayed in place of the “You have created a service” page).

However, breakpoints on the other methods in either class don’t get hit.

If I turn on WCF tracing, I see “unrecognized message version” in the log file.

  • 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-15T12:27:02+00:00Added an answer on May 15, 2026 at 12:27 pm

    Here are the steps to get this working:

    1. Download the XML-RPC for WCF sample
    2. The solution contains 3 projects: Microsoft.Samples.XmlRpc, TinyBlogEngine and TinyBlogEngineClient.
    3. Add a 4th project to the solution of type ASP.NET (I’ve called it TinyBlogEngineWeb)

    In the new project reference Microsoft.Samples.XmlRpc and TinyBlogEngine.

    Add a test.svc file to this web application which looks like this:

    <%@ ServiceHost Language="C#" Debug="true" Service="TinyBlogEngine.BloggerAPI, TinyBlogEngine" %>
    

    Add a XmlRpcEndpointBehaviorExtension class to the new project:

    namespace TinyBlogEngineWeb
    {
        public class XmlRpcEndpointBehaviorExtension : BehaviorExtensionElement
        {
            protected override object CreateBehavior()
            {
                // this comes from Microsoft.Samples.XmlRpc
                return new XmlRpcEndpointBehavior();
            }
    
            public override Type BehaviorType
            {
                get { return typeof(XmlRpcEndpointBehavior); }
            }
        }
    }
    

    Finally the system.serviceModel part of web.config should look like this:

    <system.serviceModel>
      <services>
        <service name="TinyBlogEngine.BloggerAPI" behaviorConfiguration="returnFaults">
          <endpoint address="/blogger"
                    binding="webHttpBinding"
                    contract="TinyBlogEngine.IBloggerAPI"
                    behaviorConfiguration="xmlRpcBehavior" />
        </service>
      </services>
    
      <behaviors>
        <serviceBehaviors>
          <behavior name="returnFaults">
            <serviceMetadata httpGetEnabled="true" />
            <serviceDebug includeExceptionDetailInFaults="false" />
          </behavior>
        </serviceBehaviors>
    
        <endpointBehaviors>
          <behavior name="xmlRpcBehavior">
            <xmlRpc/>
          </behavior>
        </endpointBehaviors>
      </behaviors>
    
      <extensions>
        <behaviorExtensions>
          <add name="xmlRpc"
               type="TinyBlogEngineWeb.XmlRpcEndpointBehaviorExtension, TinyBlogEngineWeb" />
        </behaviorExtensions>
      </extensions>
    </system.serviceModel>
    

    Finally modify the console client application to use the address of the web project and test:

    Uri blogAddress = new UriBuilder(
        Uri.UriSchemeHttp, 
        "localhost", 
        1260, // use the appropriate port here
        "/test.svc/blogger"
    ).Uri;
    

    Tested with Windows Live Writer and the console client application. You can download my test solution from here.

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

Sidebar

Ask A Question

Stats

  • Questions 498k
  • Answers 499k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer We built a similar solution interfacing .NET and Salesforce.com. There… May 16, 2026 at 12:26 pm
  • Editorial Team
    Editorial Team added an answer There's a good chance that Apache can read the tmp… May 16, 2026 at 12:26 pm
  • Editorial Team
    Editorial Team added an answer It may be that the numbers are actually strings. The… May 16, 2026 at 12:26 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
In order to apply a triggered animation to all ToolTip s in my app,
I want use html5's new tag to play a wav file (currently only supported
I want to count how many characters a certain string has in PHP, but
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string

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.