This post is migrated from previous hosting provider. There are still some issues with old posts. Please make a comment on this post with any issues.

Anatomy of a blog: What is a ping and how does it work?

Tags: .NET, XML, Internet and the Web, Website

During the creation of this site I wanted to know more about how the blog world works behind the scenes. I will make a few articles about my findings in this matter and what I have done to create this blog.

The first article will describe on how you inform other sources and parties that your blog is updated. This is done through a Ping. You should ping whenever you have created or updated a post on your feed. Pinging is either done automatically or manually. Manual pinging is done by finding a site with a Ping interface, like http://www.bloglines.com/ping, and then enter the Url to your feed. You can find some more on the Blog Ping List at AYWE

If you would like to do an automatic Ping then the Pinging is done through an XML-RPC procedure, which is sending XML over and HTTP request. The XML contains information of your feed and the URL to which you send the request is called the endpoint. Read more about the specification here: http://www.weblogs.com/api.html.

In my implementation used an implementation like the one described by John in a post. For more exponation I set up my blog to ping a few other feeds using these endpoints:

My site is implmented using .NET 2.0 and the sample I started from uses the XML-RPC.NET library which is based on .NET 1.1. To be able to create an implementation like John has you have to make your interface public, like this:

[XmlRpcUrl("http://rpc.weblogs.com/RPC2")] public interface IWeblogsUpdate {     [XmlRpcMethod("weblogUpdates.ping")]     WeblogsUpdateResponse ping(string weblogName, string weblogUrl); }

That's it. I'll get back with some more articles on this matter.

No Comments

Comments have been disabled for this content.

About Wictor...

Wictor Wilén is the Nordic Digital Workplace Lead working at Avanade. Wictor has achieved the Microsoft Certified Architect (MCA) - SharePoint 2010, Microsoft Certified Solutions Master (MCSM) - SharePoint  and Microsoft Certified Master (MCM) - SharePoint 2010 certifications. He has also been awarded Microsoft Most Valuable Professional (MVP) for seven consecutive years.

And a word from our sponsors...