I have actually created a REST web service with asp.net 2.0. Its really no different than creating a web page.
When I did it, I really didn't have much time to research how to do it with an asmx file so I did it in a standard aspx file. I know thier is extra overhead by doing it this way but as a first revision it was fine.
protected void PageLoad(object sender, EventArgs e)
{
using (XmlWriter xm = XmlWriter.Create(Response.OutputStream, GetXmlSettings()))
{
//do your stuff
xm.Flush();
}
}
/// <summary>
/// Create Xml Settings object to properly format the output of the xml doc.
/// </summary>
private static XmlWriterSettings GetXmlSettings()
{
XmlWriterSettings xmlSettings = new XmlWriterSettings();
xmlSettings.Indent = true;
xmlSettings.IndentChars = " ";
return xmlSettings;
}
That should be enough to get you started, I will try and post more later.
Also if you need basic authentication for your web service it can be done, but it needs to be done manually if you aren't using active directory.