Cook Computing

VB ASHX XML-RPC Service

May 25, 2004 Written by Charles Cook

A long time ago I posted how to write an XML-RPC service using an ASHX file. In case anyone is interested, here is a VB.NET sample:


<%@ WebHandler Language="VB" Class="Test" %>
<%@ Assembly Name="CookComputing.XmlRpc" %>

Imports CookComputing.XmlRpc

<XmlRpcService> _
Public Class Test
  Inherits XmlRpcService

	<XmlRpcMethod> _
	Public Function Square(ByVal x As Integer) As Integer
		Return x * x
	End Function

End Class

Note that the XML-RPC.NET assembly must be in the bin subdirectory of the directory containing the ASHX file.